diff --git a/mozilla/mailnews/imap/src/nsImapService.cpp b/mozilla/mailnews/imap/src/nsImapService.cpp index 0ea3dab7a51..46ff6a0b3e6 100644 --- a/mozilla/mailnews/imap/src/nsImapService.cpp +++ b/mozilla/mailnews/imap/src/nsImapService.cpp @@ -684,15 +684,6 @@ NS_IMETHODIMP nsImapService::DisplayMessage(const char* aMessageURI, PRBool shouldStoreMsgOffline = PR_FALSE; PRBool hasMsgOffline = PR_FALSE; - if (folder) - { - folder->ShouldStoreMsgOffline(key, &shouldStoreMsgOffline); - folder->HasMsgOffline(key, &hasMsgOffline); - } - - if (imapMessageSink) - imapMessageSink->SetNotifyDownloadedLines(shouldStoreMsgOffline); - nsCOMPtr aMsgIncomingServer; if (imapMessageSink) @@ -721,6 +712,12 @@ NS_IMETHODIMP nsImapService::DisplayMessage(const char* aMessageURI, useMimePartsOnDemand = PR_FALSE; } + if (folder) + { + folder->ShouldStoreMsgOffline(key, &shouldStoreMsgOffline); + folder->HasMsgOffline(key, &hasMsgOffline); + } + if (!useMimePartsOnDemand || (messageSize < (uint32) gMIMEOnDemandThreshold)) // allowedToBreakApart && // !GetShouldFetchAllParts() && @@ -734,8 +731,12 @@ NS_IMETHODIMP nsImapService::DisplayMessage(const char* aMessageURI, { // whenever we are displaying a message, we want to add it to the memory cache.. imapUrl->SetFetchPartsOnDemand(PR_TRUE); + shouldStoreMsgOffline = PR_FALSE; // if we're fetching by parts, don't store offline msgurl->SetAddToMemoryCache(PR_FALSE); } + if (imapMessageSink) + imapMessageSink->SetNotifyDownloadedLines(shouldStoreMsgOffline); + PRBool msgLoadingFromCache = PR_FALSE; if (hasMsgOffline) msgurl->SetMsgIsInLocalCache(PR_TRUE);