зеркало из https://github.com/mozilla/pjs.git
occasionally expunge folders when user is using delete immediately delete model, r/sr=mscott 156168
This commit is contained in:
Родитель
9f53d7c04e
Коммит
bcaed1d16e
|
@ -1602,10 +1602,8 @@ NS_IMETHODIMP nsImapProtocol::CanHandleUrl(nsIImapUrl * aImapUrl,
|
||||||
nsCAutoString curSelectedUrlFolderName;
|
nsCAutoString curSelectedUrlFolderName;
|
||||||
nsCAutoString pendingUrlFolderName;
|
nsCAutoString pendingUrlFolderName;
|
||||||
if (inSelectedState)
|
if (inSelectedState)
|
||||||
{
|
curSelectedUrlFolderName = GetServerStateParser().GetSelectedMailboxName();
|
||||||
curSelectedUrlFolderName =
|
|
||||||
GetServerStateParser().GetSelectedMailboxName();
|
|
||||||
}
|
|
||||||
if (isBusy)
|
if (isBusy)
|
||||||
{
|
{
|
||||||
nsImapState curUrlImapState;
|
nsImapState curUrlImapState;
|
||||||
|
@ -3337,10 +3335,11 @@ void nsImapProtocol::ProcessMailboxUpdate(PRBool handlePossibleUndo)
|
||||||
// lets see if we should expunge during a full sync of flags.
|
// 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
|
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 */)
|
if ((m_flagState->GetNumberOfDeletedMessages() >= 20/* gExpungeThreshold */)
|
||||||
&& GetDeleteIsMoveToTrash() && m_imapAction != nsIImapUrl::nsImapLiteSelectFolder)
|
&& !GetShowDeletedMessages() && m_imapAction != nsIImapUrl::nsImapLiteSelectFolder)
|
||||||
Expunge(); // might be expensive, test for user cancel
|
Expunge();
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
@ -7161,6 +7160,15 @@ nsImapProtocol::GetDeleteIsMoveToTrash()
|
||||||
return rv;
|
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)
|
NS_IMETHODIMP nsImapProtocol::OverrideConnectionInfo(const PRUnichar *pHost, PRUint16 pPort, const char *pCookieData)
|
||||||
{
|
{
|
||||||
m_logonHost.AssignWithConversion(pHost);
|
m_logonHost.AssignWithConversion(pHost);
|
||||||
|
|
|
@ -431,6 +431,7 @@ private:
|
||||||
// End thread support stuff
|
// End thread support stuff
|
||||||
|
|
||||||
PRBool GetDeleteIsMoveToTrash();
|
PRBool GetDeleteIsMoveToTrash();
|
||||||
|
PRBool GetShowDeletedMessages();
|
||||||
PRMonitor *GetDataMemberMonitor();
|
PRMonitor *GetDataMemberMonitor();
|
||||||
nsCString m_currentCommand;
|
nsCString m_currentCommand;
|
||||||
nsImapServerResponseParser m_parser;
|
nsImapServerResponseParser m_parser;
|
||||||
|
|
Загрузка…
Ссылка в новой задаче