Bug 809513 - Don't notify for new mail in Sent folder. r=me
authorJorg K <jorgk@jorgk.com>
Fri, 30 Nov 2018 00:40:33 +0100
changeset 33819 9063f5e11b9e74c7d6f1f8239ef9a958af2662c7
parent 33818 785c09b1b20ec61730025cfbdaca35f4c405a291
child 33820 27a12bd5adcafe52ebd5540269d45f119cf93b5c
push id388
push userclokep@gmail.com
push dateMon, 28 Jan 2019 20:54:56 +0000
reviewersme
bugs809513
Bug 809513 - Don't notify for new mail in Sent folder. r=me
mailnews/base/content/newmailalert.js
mailnews/base/src/nsMessengerUnixIntegration.cpp
--- a/mailnews/base/content/newmailalert.js
+++ b/mailnews/base/content/newmailalert.js
@@ -52,22 +52,22 @@ function prefillAlertInfo()
   // This is really the root folder and we have to walk through the list to
   // find the real folder that has new mail in it...:(
   let allFolders = rootFolder.descendants;
   var folderSummaryInfoEl = document.getElementById('folderSummaryInfo');
   folderSummaryInfoEl.mMaxMsgHdrsInPopup = gNumNewMsgsToShowInAlert;
   for (let folder of fixIterator(allFolders, Ci.nsIMsgFolder))
   {
     // Enable new mail notification if folder has new messages and folder is not
-    // Virtual and not SpecialUse unless folder is Inbox or SentMail. Note: SpecialUse
+    // Virtual and not SpecialUse unless folder is Inbox. Note: SpecialUse
     // includes Inbox and SentMail as well as Drafts, Trash, Junk, Archive, Templates
     // and Queue.
     if (folder.hasNewMessages &&
         !folder.getFlag((Ci.nsMsgFolderFlags.SpecialUse | Ci.nsMsgFolderFlags.Virtual) &
-                       ~(Ci.nsMsgFolderFlags.Inbox | Ci.nsMsgFolderFlags.SentMail)))
+                        ~Ci.nsMsgFolderFlags.Inbox))
     {
       var asyncFetch = {};
       folderSummaryInfoEl.parseFolder(folder, new urlListener(folder), asyncFetch);
       if (asyncFetch.value)
         gPendingPreviewFetchRequests++;
     }
   }
 }
--- a/mailnews/base/src/nsMessengerUnixIntegration.cpp
+++ b/mailnews/base/src/nsMessengerUnixIntegration.cpp
@@ -602,22 +602,22 @@ nsresult nsMessengerUnixIntegration::Get
         continue;
 
       uint32_t flags;
       rv = msgFolder->GetFlags(&flags);
 
       if (NS_FAILED(rv))
         continue;
 
-      // Skip check for new mail if folder is Virtual or SpecialUse but not Inbox
-      // or SentMail. Note: SpecialUse includes Inbox and SentMail as well as
+      // Skip check for new mail if folder is Virtual or SpecialUse but not Inbox.
+      // Note: SpecialUse includes Inbox and SentMail as well as
       // Drafts, Trash, Junk, Archive Templates and Queue. A notification of new
       // mail will not be produced for folders that are skipped.
       if (flags & ((nsMsgFolderFlags::SpecialUse | nsMsgFolderFlags::Virtual) &
-          ~(nsMsgFolderFlags::Inbox | nsMsgFolderFlags::SentMail)))
+                   ~nsMsgFolderFlags::Inbox))
         continue;
 
       nsCString folderURI;
       msgFolder->GetURI(folderURI);
       bool hasNew = false;
       rv = msgFolder->GetHasNewMessages(&hasNew);
 
       if (NS_FAILED(rv))