close db's as we go downloading newsgroups for offline use, sr=mscott 142278

This commit is contained in:
bienvenu%nventure.com 2004-10-25 04:16:04 +00:00
Родитель 2e1860cbb5
Коммит f1f93537de
1 изменённых файлов: 12 добавлений и 0 удалений

Просмотреть файл

@ -51,6 +51,7 @@
#include "nsIMsgAccountManager.h"
#include "nsMsgFolderFlags.h"
#include "nsIRequestObserver.h"
#include "nsIMsgMailSession.h"
// This file contains the news article download state machine.
@ -479,6 +480,17 @@ nsresult nsMsgDownloadAllNewsgroups::AdvanceToNextGroup(PRBool *done)
if (newsFolder)
newsFolder->SetSaveArticleOffline(PR_FALSE);
nsCOMPtr<nsIMsgMailSession> session =
do_GetService(NS_MSGMAILSESSION_CONTRACTID, &rv);
if (NS_SUCCEEDED(rv) && session)
{
PRBool folderOpen;
PRUint32 folderFlags;
m_currentFolder->GetFlags(&folderFlags);
session->IsFolderOpenInWindow(m_currentFolder, &folderOpen);
if (!folderOpen && ! (folderFlags & (MSG_FOLDER_FLAG_TRASH | MSG_FOLDER_FLAG_INBOX)))
m_currentFolder->SetMsgDatabase(nsnull);
}
m_currentFolder = nsnull;
}