Mercurial > wow > mailopener
comparison Core.lua @ 163:86d9e008b0ad
The mailbox will still be automatically refreshed while automatic mail opening is disabled.
| author | Zerotorescue |
|---|---|
| date | Mon, 19 Dec 2011 14:05:57 +0100 |
| parents | 8a525473f8e2 |
| children |
comparison
equal
deleted
inserted
replaced
| 162:8a525473f8e2 | 163:86d9e008b0ad |
|---|---|
| 683 | 683 |
| 684 -- BeanCounter is the only addon hiding the mail close button while busy, so we can look for that | 684 -- BeanCounter is the only addon hiding the mail close button while busy, so we can look for that |
| 685 --local BeanCounterActive = not InboxCloseButton:IsVisible(); | 685 --local BeanCounterActive = not InboxCloseButton:IsVisible(); |
| 686 | 686 |
| 687 --if not BeanCounterActive and AutoOpenMail and not MailAddonBusy then | 687 --if not BeanCounterActive and AutoOpenMail and not MailAddonBusy then |
| 688 if AutoOpenMail and not MailAddonBusy then | 688 --if AutoOpenMail and not MailAddonBusy then |
| 689 if not MailAddonBusy then | |
| 689 -- Query the server | 690 -- Query the server |
| 690 CheckInbox(); | 691 CheckInbox(); |
| 691 end | 692 end |
| 692 | 693 |
| 693 -- Stop previous timer | 694 -- Stop previous timer |
| 840 | 841 |
| 841 -- The idea for this is to wait with refresing while there is still mail remaining which can be opened | 842 -- The idea for this is to wait with refresing while there is still mail remaining which can be opened |
| 842 -- This should speed things up a tiny bit, but might become buggy if coded wrong | 843 -- This should speed things up a tiny bit, but might become buggy if coded wrong |
| 843 -- We actually override the function in the onenable | 844 -- We actually override the function in the onenable |
| 844 function NewCheckInbox(...) | 845 function NewCheckInbox(...) |
| 845 if not MailOpener.db.profile.general.overrideCheckInbox or not MailOpener.db.profile.general.continueOpening or not lastAmount or lastAmount == 0 then | 846 if not MailOpener.db.profile.general.overrideCheckInbox or not MailOpener.db.profile.general.continueOpening or not AutoOpenMail or not lastAmount or lastAmount == 0 then |
| 846 -- If the override Check Inbox option is off | 847 -- If the override Check Inbox option is off |
| 847 -- or continuous opening is off | 848 -- or continuous opening is off |
| 848 -- or there's currently no mail visible | 849 -- or there's currently no mail visible |
| 849 | 850 |
| 850 MailOpener:Debug("CheckInbox:" .. tostring((not MailOpener.db.profile.general.overrideCheckInbox)) .. "/" .. tostring((not MailOpener.db.profile.general.continueOpening)) .. "/" .. tostring(lastAmount == 0)); | 851 MailOpener:Debug("CheckInbox:" .. tostring((not MailOpener.db.profile.general.overrideCheckInbox)) .. "/" .. tostring((not MailOpener.db.profile.general.continueOpening)) .. "/" .. tostring(lastAmount == 0)); |
