mirror of
https://github.com/mozilla/gecko-dev.git
synced 2024-10-13 05:15:45 +00:00
Bug #122236 --> set the performing biff flag when we are about to perform biff
and register the root folder as a listener on the url so it can clear the flag r=naving sr=bienvenu
This commit is contained in:
parent
90f007dec7
commit
66e5d0b2ca
@ -903,11 +903,15 @@ nsImapIncomingServer::PerformExpand(nsIMsgWindow *aMsgWindow)
|
||||
NS_IMETHODIMP nsImapIncomingServer::PerformBiff()
|
||||
{
|
||||
nsresult rv;
|
||||
nsCOMPtr<nsIMsgFolder> rootMsgFolder;
|
||||
rv = GetRootMsgFolder(getter_AddRefs(rootMsgFolder));
|
||||
if(NS_SUCCEEDED(rv) && rootMsgFolder)
|
||||
rv = rootMsgFolder->GetNewMessages(nsnull, nsnull);
|
||||
return rv;
|
||||
|
||||
nsCOMPtr<nsIMsgFolder> rootMsgFolder;
|
||||
rv = GetRootMsgFolder(getter_AddRefs(rootMsgFolder));
|
||||
if(NS_SUCCEEDED(rv))
|
||||
{
|
||||
SetPerformingBiff(PR_TRUE);
|
||||
rv = rootMsgFolder->GetNewMessages(nsnull, nsnull);
|
||||
}
|
||||
return rv;
|
||||
}
|
||||
|
||||
|
||||
|
@ -4047,7 +4047,7 @@ nsImapMailFolder::OnStopRunningUrl(nsIURI *aUrl, nsresult aExitCode)
|
||||
{
|
||||
nsCOMPtr<nsIMsgWindow> aWindow;
|
||||
nsCOMPtr<nsIMsgMailNewsUrl> mailUrl = do_QueryInterface(aUrl);
|
||||
nsCOMPtr<nsIImapUrl> imapUrl = do_QueryInterface(aUrl);
|
||||
nsCOMPtr<nsIImapUrl> imapUrl = do_QueryInterface(aUrl);
|
||||
PRBool folderOpen = PR_FALSE;
|
||||
if (mailUrl)
|
||||
mailUrl->GetMsgWindow(getter_AddRefs(aWindow));
|
||||
@ -4239,8 +4239,17 @@ nsImapMailFolder::OnStopRunningUrl(nsIURI *aUrl, nsresult aExitCode)
|
||||
// query it for a mailnews interface for now....
|
||||
if (mailUrl)
|
||||
rv = mailUrl->UnRegisterListener(this);
|
||||
|
||||
if (!aWindow) // if we don't have a window then we are proably running a biff url
|
||||
{
|
||||
nsCOMPtr<nsIMsgIncomingServer> server;
|
||||
GetServer(getter_AddRefs(server));
|
||||
if (server)
|
||||
server->SetPerformingBiff(PR_FALSE);
|
||||
}
|
||||
}
|
||||
SetGettingNewMessages(PR_FALSE); // if we're not running a url, we must not be getting new mail :-)
|
||||
|
||||
// Only send the OnStopCopy notification if we have no copy state (which means we're doing an online
|
||||
// move/copy, and have cleared the copy state above) or if we've finished the move/copy
|
||||
// of multiple imap messages, one msg at a time (i.e., moving to a local folder).
|
||||
|
Loading…
Reference in New Issue
Block a user