Bug 748997 - New mail notification issue since upgrading to TB12. Move the num new message count initialization to the right place. r+a=Standard8
authorDavid Bienvenu <dbienvenu@mozilla.com>
Sat, 28 Apr 2012 14:45:29 +0100
changeset 30778 dc7679cbae9b86b9d03e749e6bc7653e89bdb17d
parent 30777 df893565cbac61fc8bde6872b50b7a2728b4ce3c
child 30779 fc4c8114809d00e9dfd33679d6e1a4814e9e37bb
push id1
push userclokep@gmail.com
push dateMon, 07 May 2018 22:45:56 +0000
treeherdercomm-esr60@57eacde5ef40 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
bugs748997
Bug 748997 - New mail notification issue since upgrading to TB12. Move the num new message count initialization to the right place. r+a=Standard8
mailnews/local/src/nsPop3Sink.cpp
--- a/mailnews/local/src/nsPop3Sink.cpp
+++ b/mailnews/local/src/nsPop3Sink.cpp
@@ -290,16 +290,18 @@ nsPop3Sink::BeginMailDelivery(bool uidlD
   {
     PR_LOG(POP3LOGMODULE, PR_LOG_MAX, ("BeginMailDelivery folder locked"));
     return NS_MSG_FOLDER_BUSY;
   }
   m_uidlDownload = uidlDownload;
   if (!uidlDownload)
     FindPartialMessages();
 
+  m_folder->GetNumNewMessages(false, &m_numNewMessagesInFolder);
+
 #ifdef DEBUG
   printf("Begin mail message delivery.\n");
 #endif
   nsCOMPtr<nsIPop3Service> pop3Service(do_GetService(NS_POP3SERVICE_CONTRACTID1, &rv));
   NS_ENSURE_SUCCESS(rv, rv);
   pop3Service->NotifyDownloadStarted(m_folder);
   if (aBool)
     *aBool = true;
@@ -562,17 +564,16 @@ nsPop3Sink::IncorporateBegin(const char*
   nsCOMPtr<nsISeekableStream> seekableOutStream = do_QueryInterface(m_outFileStream);
 
   // create a new mail parser
   m_newMailParser = new nsParseNewMailState;
   NS_ENSURE_TRUE(m_newMailParser, NS_ERROR_OUT_OF_MEMORY);
   if (m_uidlDownload)
     m_newMailParser->DisableFilters();
 
-  m_folder->GetNumNewMessages(false, &m_numNewMessagesInFolder);
   nsCOMPtr <nsIMsgFolder> serverFolder;
   rv = GetServerFolder(getter_AddRefs(serverFolder));
   if (NS_FAILED(rv)) return rv;
 
   rv = m_newMailParser->Init(serverFolder, m_folder,
                              m_window, newHdr, m_outFileStream);
   // If we failed to initialize the parser, then just don't use it!!!
   // We can still continue without one.