fix issue downloading partial pop3 messages from stand-alone msg window opened from cross-folder saved search, sr=mscott 361279
git-svn-id: svn://10.0.0.236/branches/MOZILLA_1_8_BRANCH@220750 18797224-902f-48f8-a5cc-f745e15eee43
This commit is contained in:
@@ -5970,6 +5970,7 @@ nsresult nsMsgDBView::CopyDBView(nsMsgDBView *aNewMsgDBView, nsIMessenger *aMess
|
||||
aNewMsgDBView->m_viewFlags = m_viewFlags;
|
||||
aNewMsgDBView->m_sortOrder = m_sortOrder;
|
||||
aNewMsgDBView->m_sortType = m_sortType;
|
||||
aNewMsgDBView->m_sortValid = m_sortValid;
|
||||
aNewMsgDBView->m_db = m_db;
|
||||
aNewMsgDBView->mDateFormater = mDateFormater;
|
||||
if (m_db)
|
||||
|
||||
@@ -110,6 +110,30 @@ nsMsgXFVirtualFolderDBView::CopyDBView(nsMsgDBView *aNewMsgDBView, nsIMessenger
|
||||
|
||||
newMsgDBView->m_viewFolder = m_viewFolder;
|
||||
newMsgDBView->m_searchSession = m_searchSession;
|
||||
|
||||
PRInt32 scopeCount;
|
||||
nsCOMPtr <nsIMsgSearchSession> searchSession = do_QueryReferent(m_searchSession);
|
||||
nsCOMPtr<nsIMsgDBService> msgDBService = do_GetService(NS_MSGDB_SERVICE_CONTRACTID);
|
||||
searchSession->CountSearchScopes(&scopeCount);
|
||||
for (PRInt32 i = 0; i < scopeCount; i++)
|
||||
{
|
||||
nsMsgSearchScopeValue scopeId;
|
||||
nsCOMPtr<nsIMsgFolder> searchFolder;
|
||||
searchSession->GetNthSearchScope(i, &scopeId, getter_AddRefs(searchFolder));
|
||||
if (searchFolder)
|
||||
{
|
||||
nsCOMPtr<nsIMsgDatabase> searchDB;
|
||||
nsXPIDLCString searchUri;
|
||||
m_viewFolder->GetURI(getter_Copies(searchUri));
|
||||
nsresult rv = searchFolder->GetMsgDatabase(nsnull, getter_AddRefs(searchDB));
|
||||
if (NS_SUCCEEDED(rv) && searchDB)
|
||||
{
|
||||
if (msgDBService)
|
||||
msgDBService->RegisterPendingListener(searchFolder, newMsgDBView);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
return NS_OK;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user