summaryrefslogtreecommitdiffstats
path: root/mailnews/base/content
diff options
context:
space:
mode:
Diffstat (limited to 'mailnews/base/content')
-rw-r--r--mailnews/base/content/newmailalert.js20
1 files changed, 14 insertions, 6 deletions
diff --git a/mailnews/base/content/newmailalert.js b/mailnews/base/content/newmailalert.js
index 243934092..f54d165b1 100644
--- a/mailnews/base/content/newmailalert.js
+++ b/mailnews/base/content/newmailalert.js
@@ -57,12 +57,20 @@ function prefillAlertInfo()
folderSummaryInfoEl.mMaxMsgHdrsInPopup = gNumNewMsgsToShowInAlert;
for (let folder in fixIterator(allFolders, Components.interfaces.nsIMsgFolder))
{
- if (folder.hasNewMessages && !folder.getFlag(Ci.nsMsgFolderFlags.Virtual))
- {
- var asyncFetch = {};
- folderSummaryInfoEl.parseFolder(folder, new urlListener(folder), asyncFetch);
- if (asyncFetch.value)
- gPendingPreviewFetchRequests++;
+ if (folder.hasNewMessages) {
+ let notify =
+ // Any folder which is an inbox or ...
+ folder.getFlag(Ci.nsMsgFolderFlags.Inbox) ||
+ // any non-special or non-virtual folder. In other words, we don't
+ // notify for Drafts|Trash|SentMail|Templates|Junk|Archive|Queue or virtual.
+ !(folder.flags & (Ci.nsMsgFolderFlags.SpecialUse | Ci.nsMsgFolderFlags.Virtual));
+
+ if (notify) {
+ var asyncFetch = {};
+ folderSummaryInfoEl.parseFolder(folder, new urlListener(folder), asyncFetch);
+ if (asyncFetch.value)
+ gPendingPreviewFetchRequests++;
+ }
}
}
}