fix biff on non-inbox open folder to update, r/sr=mscott 226114

This commit is contained in:
bienvenu%nventure.com 2003-11-18 20:32:57 +00:00
parent 8436b3827c
commit 6688554274

View File

@ -3585,6 +3585,12 @@ nsImapIncomingServer::GetNewMessagesForNonInboxFolders(nsIMsgFolder *aRootFolder
if (imapFolder)
imapFolder->SetPerformingBiff(PR_TRUE);
}
PRBool isOpen = PR_FALSE;
nsCOMPtr <nsIMsgMailSession> mailSession = do_GetService(NS_MSGMAILSESSION_CONTRACTID);
if (mailSession && aRootFolder)
mailSession->IsFolderOpenInWindow(aRootFolder, &isOpen);
// eventually, the gGotStatusPref should go away, once we work out the kinks
// from using STATUS.
if (!gGotStatusPref)
{
nsCOMPtr<nsIPrefBranch> prefBranch = do_GetService(NS_PREFSERVICE_CONTRACTID);
@ -3592,7 +3598,7 @@ nsImapIncomingServer::GetNewMessagesForNonInboxFolders(nsIMsgFolder *aRootFolder
prefBranch->GetBoolPref("mail.imap.use_status_for_biff", &gUseStatus);
gGotStatusPref = PR_TRUE;
}
if (gUseStatus)
if (gUseStatus && !isOpen)
{
nsCOMPtr <nsIMsgImapMailFolder> imapFolder = do_QueryInterface(aRootFolder);
if (imapFolder)