From 6b1bd0cfe6f1d0f43f5b13c80524211a8c2c3a62 Mon Sep 17 00:00:00 2001 From: foudfou Date: Thu, 21 Mar 2013 08:57:17 +0100 Subject: [PATCH] cleaning --- src/modules/FiretrayMessaging.jsm | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/modules/FiretrayMessaging.jsm b/src/modules/FiretrayMessaging.jsm index d52006a..964fc83 100644 --- a/src/modules/FiretrayMessaging.jsm +++ b/src/modules/FiretrayMessaging.jsm @@ -308,6 +308,9 @@ firetray.Messaging = { addUnreadMessages: function(folder) { let folderUnreadMsgCount = folder['getNumUnread'](false); log.debug("folder: "+folder.prettyName+" folderUnreadMsgCount="+folderUnreadMsgCount); + /* nsMsgDBFolder::GetNumUnread basically returns mNumUnreadMessages + + mNumPendingUnreadMessages, while mNumPendingUnreadMessages may get -1 + when updated from the cache. Which means getNumUnread might return -1. */ if (folderUnreadMsgCount > 0) this.newMsgCount += folderUnreadMsgCount; },