diff Modules/FailSafe.lua @ 42:8168280420ae

Added a new option to both sound notifications to limit playing of the sound to once per mailbox visit, instead of once per mailbox refresh / bags update.
author Zerotorescue
date Sat, 11 Sep 2010 21:31:26 +0200
parents 2b2bea9c7446
children eadff31e61e8
line wrap: on
line diff
--- a/Modules/FailSafe.lua	Sat Sep 11 18:43:14 2010 +0200
+++ b/Modules/FailSafe.lua	Sat Sep 11 21:31:26 2010 +0200
@@ -31,6 +31,11 @@
 	self:Debug("OnDisable");
 	
 	self:UnregisterEvent("MAIL_SHOW");
+	
+	-- If we were toggling this module off while the mailbox is opened we must unregister all events
+	if MailFrame:IsVisible() then
+		self:MAIL_CLOSED();
+	end
 end
 
 function mod:MAIL_SHOW()