Bug 748997 - New mail notification issue since upgrading to TB12. Move the num new message count initialization to the right place. r=Standard8
--- a/mailnews/local/src/nsPop3Sink.cpp
+++ b/mailnews/local/src/nsPop3Sink.cpp
@@ -291,16 +291,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;
@@ -563,17 +565,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.