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:
mscott%netscape.com 2002-02-05 01:36:42 +00:00
parent 90f007dec7
commit 66e5d0b2ca
2 changed files with 19 additions and 6 deletions

View File

@ -903,10 +903,14 @@ nsImapIncomingServer::PerformExpand(nsIMsgWindow *aMsgWindow)
NS_IMETHODIMP nsImapIncomingServer::PerformBiff()
{
nsresult rv;
nsCOMPtr<nsIMsgFolder> rootMsgFolder;
rv = GetRootMsgFolder(getter_AddRefs(rootMsgFolder));
if(NS_SUCCEEDED(rv) && rootMsgFolder)
if(NS_SUCCEEDED(rv))
{
SetPerformingBiff(PR_TRUE);
rv = rootMsgFolder->GetNewMessages(nsnull, nsnull);
}
return rv;
}

View File

@ -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).