diff Core.lua @ 2:57ba1593ac42

Reducing amount of calculations regarding mail updates, all mail changes are now addon-wide broadcasted messages. Main reason for this is to allow for another plugin.
author Zerotorescue
date Sun, 05 Sep 2010 17:26:35 +0200
parents 6f17035de058
children c6f0976069c7
line wrap: on
line diff
--- a/Core.lua	Sun Sep 05 17:02:19 2010 +0200
+++ b/Core.lua	Sun Sep 05 17:26:35 2010 +0200
@@ -338,6 +338,11 @@
 			-- Open the current mail
 			self:ScheduleOpen(false);
 		end
+	elseif current < tempLastAmount then
+		-- We lost a mail
+		
+		-- Yell that we successfully opened/removed a mail
+		self:SendMessage("MO_MAIL_DELETED");
 	elseif (current == 50 and tempLastAmount == 50) then
 		if not IsShiftKeyDown() then
 			-- Allow overriding of mailopening with the shift key