shirsig / Mail

Vanilla WoW Mail AddOn. IMPORTANT: The folder name must be "Mail".
57 stars 17 forks source link

Bug not removing "You have mail"-icon from Minimap #31

Closed dogmax closed 7 years ago

dogmax commented 7 years ago

The "You got mail"-notification icon on the minimap isn't removed when all mail has been looted using auto-open all mail.

shirsig commented 7 years ago

There's a bug in the vanilla client that the api tells you you still have mail if the last one was opened without a hardware event. I added some code to hide the icon when the mailbox is empty at the moment you leave it but it will still reappear when you reload the ui or relog and there's nothing that can be done. If it doesn't disappear at all that's either due to an addon conflict or server bug.

sipertruk commented 6 years ago

If you open more than one page of mails the icon will disappear only if you return to the first page first. Maybe the addon should change the page when the current one doesn't contain anymore mail, if that's possible without user interaction that is.. Edit: it's not always happening though there might be something else about it.

shirsig commented 6 years ago

Cannot reproduce this. Are you sure you didn't just not wait long enough for everything to be looted (as you wouldn't see when it's done if you're not on the first page)

sipertruk commented 6 years ago

The icon disappear and shortly reappear. Maybe I'm confused about having a specific page displayed because it's a rare occurrence. I'll try to record.

shirsig commented 6 years ago

There used to be a bug on nostalrius that an event would fire after walking away from the mailbox that would make it reappear. Actually made a workaround for that, later removed it after the shutdown because it wasn't necessary on kronos, and have never seen it happen on nost successors so far.

sipertruk commented 6 years ago

I get it now, it's when I mix the two mail opening methods.

When the mail window is closed and the manual method has been used and all mail has been cleared read, the client send a request for the unread mail status. In your automatic method the mail is not set as read so the server answers by the positive. It is in fact the same that's happening when you zone out.

Doing GetInboxText(i) just before you delete a mail item can ensure the mail is set as read. It makes the client send a request for each.

shirsig commented 6 years ago

cool, seems to work, thanks