Bug 1157256 - Allow auto-compact to occur for IMAP folder when online. r=jorgk
authorGene Smith <gds@chartertn.net>
Sun, 25 Feb 2018 19:11:33 -0500
changeset 31236 b76b8ab0796ba5bb919d168e873a697e7f448f45
parent 31235 278d1f336d04a8bc0a6cb2181a98bee40ce6fb9f
child 31237 041b1f4d46ca8af27469b1fe91eaa42b1efc5a6f
push id383
push userclokep@gmail.com
push dateMon, 07 May 2018 21:52:48 +0000
reviewersjorgk
bugs1157256
Bug 1157256 - Allow auto-compact to occur for IMAP folder when online. r=jorgk For unknown reasons, IMAP folder were only auto-compacted in offline mode.
mailnews/imap/src/nsImapMailFolder.cpp
--- a/mailnews/imap/src/nsImapMailFolder.cpp
+++ b/mailnews/imap/src/nsImapMailFolder.cpp
@@ -808,21 +808,19 @@ NS_IMETHODIMP nsImapMailFolder::UpdateFo
     if (url)
     {
       nsCOMPtr <nsIMsgMailNewsUrl> mailnewsUrl = do_QueryInterface(url, &rv);
       NS_ENSURE_SUCCESS(rv, rv);
       mailnewsUrl->RegisterListener(this);
       m_urlListener = aUrlListener;
     }
 
-    if (rv == NS_MSG_ERROR_OFFLINE)
-    {
-      if (aMsgWindow)
-        AutoCompact(aMsgWindow);
-    }
+    // Allow IMAP folder auto-compact to occur when online or offline.
+    if (aMsgWindow)
+      AutoCompact(aMsgWindow);
 
     if (rv == NS_MSG_ERROR_OFFLINE || rv == NS_BINDING_ABORTED)
     {
       rv = NS_OK;
       NotifyFolderEvent(kFolderLoaded);
     }
   }
   else if (NS_SUCCEEDED(rv))  // tell the front end that the folder is loaded if we're not going to