View Single Post
11/29/14, 06:52 PM   #3
merlight
AddOn Author - Click to view addons
Join Date: Jul 2014
Posts: 671
Not entirely sure, it's been some time since I've done anything with the mail, but IIRC these events don't speak about UI. MAIL_INTERACTION_FRAGMENT calls RequestOpenMailbox() when it's shown, and CloseMailbox() when it's hidden. I believe these functions guard access to the internal mailbox controller, and the OPEN/CLOSE events tell you when you can use mail-related API functions.

If you need to know when the mail UI is shown/hidden, you can MAIL_INTERACTION_FRAGMENT:RegisterCallback("StateChange", function(oldState, newState) ... end). If you're only interested in MAIL_INBOX_SCENE or MAIL_SEND_SCENE, then you can RegisterCallback on the desired scene.
  Reply With Quote