Bug 809513 - Backed out 2 changesets to make way for a correct solution. a=backout DONTBUILD
authorJorg K <jorgk@jorgk.com>
Fri, 30 Nov 2018 03:11:58 +0100
changeset 33822 95ff25a433f1ccd0edad426c5b966459c0f9f085
parent 33821 57a3525213c488c59d860dccb21442233e1107df
child 33823 9a6732b236dae53ed8b7cf4da8851755c7498ba8
push id388
push userclokep@gmail.com
push dateMon, 28 Jan 2019 20:54:56 +0000
reviewersbackout
bugs809513
Bug 809513 - Backed out 2 changesets to make way for a correct solution. a=backout DONTBUILD Backed out changeset 9063f5e11b9e (bug 809513) Backed out changeset 6d2e32bd9729 (bug 809513)
mailnews/base/content/newmailalert.js
mailnews/base/src/nsMessengerUnixIntegration.cpp
--- a/mailnews/base/content/newmailalert.js
+++ b/mailnews/base/content/newmailalert.js
@@ -51,23 +51,17 @@ 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. 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))
+    if (folder.hasNewMessages && !folder.getFlag(Ci.nsMsgFolderFlags.Virtual))
     {
       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,20 @@ 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.
-      // 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))
+      // Unless we're dealing with an Inbox, we don't care
+      // about Drafts, Queue, SentMail, Template, or Junk folders
+      if (!(flags & nsMsgFolderFlags::Inbox) &&
+           (flags & (nsMsgFolderFlags::SpecialUse & ~nsMsgFolderFlags::Inbox)))
         continue;
 
       nsCString folderURI;
       msgFolder->GetURI(folderURI);
       bool hasNew = false;
       rv = msgFolder->GetHasNewMessages(&hasNew);
 
       if (NS_FAILED(rv))