diff options
author | Matt A. Tobin <email@mattatobin.com> | 2019-11-10 22:59:41 -0500 |
---|---|---|
committer | Matt A. Tobin <email@mattatobin.com> | 2019-11-10 22:59:41 -0500 |
commit | 2fa79c8372780e7c198c84b677b5290f5b120900 (patch) | |
tree | 5cb62dc66061dddeac45632f97012fcb0ed26cd0 /mailnews/base/content/newmailalert.js | |
parent | 6d5922ba891f5f0e37f6c70f16aae558f1a4063d (diff) | |
download | UXP-2fa79c8372780e7c198c84b677b5290f5b120900.tar UXP-2fa79c8372780e7c198c84b677b5290f5b120900.tar.gz UXP-2fa79c8372780e7c198c84b677b5290f5b120900.tar.lz UXP-2fa79c8372780e7c198c84b677b5290f5b120900.tar.xz UXP-2fa79c8372780e7c198c84b677b5290f5b120900.zip |
Bug 809513 - Prevent unread Drafts from showing in new mail notification.
Change mainly affects Windows. However, Linux integration also changed so that it also allows new mail notification to occur for folder with SentMail flag.
Tag #1273
Diffstat (limited to 'mailnews/base/content/newmailalert.js')
-rw-r--r-- | mailnews/base/content/newmailalert.js | 20 |
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++; + } } } } |