occasionally expunge folders when user is using delete immediately delete model, r/sr=mscott 156168

This commit is contained in:
bienvenu%nventure.com 2003-09-23 18:53:12 +00:00
Родитель 9f53d7c04e
Коммит bcaed1d16e
2 изменённых файлов: 16 добавлений и 7 удалений

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

@ -1602,10 +1602,8 @@ NS_IMETHODIMP nsImapProtocol::CanHandleUrl(nsIImapUrl * aImapUrl,
nsCAutoString curSelectedUrlFolderName;
nsCAutoString pendingUrlFolderName;
if (inSelectedState)
{
curSelectedUrlFolderName =
GetServerStateParser().GetSelectedMailboxName();
}
curSelectedUrlFolderName = GetServerStateParser().GetSelectedMailboxName();
if (isBusy)
{
nsImapState curUrlImapState;
@ -3337,10 +3335,11 @@ void nsImapProtocol::ProcessMailboxUpdate(PRBool handlePossibleUndo)
// lets see if we should expunge during a full sync of flags.
if (!DeathSignalReceived()) // only expunge if not reading messages manually and before fetching new
{
// ### TODO read gExpungeThreshhold from prefs. Don't do expunge when we are lite selecting folder because we could be doing undo
// ### TODO read gExpungeThreshhold from prefs. Don't do expunge when we
// are lite selecting folder because we could be doing undo
if ((m_flagState->GetNumberOfDeletedMessages() >= 20/* gExpungeThreshold */)
&& GetDeleteIsMoveToTrash() && m_imapAction != nsIImapUrl::nsImapLiteSelectFolder)
Expunge(); // might be expensive, test for user cancel
&& !GetShowDeletedMessages() && m_imapAction != nsIImapUrl::nsImapLiteSelectFolder)
Expunge();
}
}
@ -7161,6 +7160,15 @@ nsImapProtocol::GetDeleteIsMoveToTrash()
return rv;
}
PRBool
nsImapProtocol::GetShowDeletedMessages()
{
PRBool rv = PR_FALSE;
if (m_hostSessionList)
m_hostSessionList->GetShowDeletedMessagesForHost(GetImapServerKey(), rv);
return rv;
}
NS_IMETHODIMP nsImapProtocol::OverrideConnectionInfo(const PRUnichar *pHost, PRUint16 pPort, const char *pCookieData)
{
m_logonHost.AssignWithConversion(pHost);

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

@ -431,6 +431,7 @@ private:
// End thread support stuff
PRBool GetDeleteIsMoveToTrash();
PRBool GetShowDeletedMessages();
PRMonitor *GetDataMemberMonitor();
nsCString m_currentCommand;
nsImapServerResponseParser m_parser;