138014 r=bienvenu sr=mscott Make undo delete messages work for the case when we do Ctrl A/Select all and delete all messages in an imap folder.

This commit is contained in:
naving%netscape.com 2002-04-18 22:15:39 +00:00
Родитель 14b78cd3fc
Коммит 16d2f4951e
1 изменённых файлов: 3 добавлений и 2 удалений

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

@ -3135,8 +3135,9 @@ 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.
if ((m_flagState->GetNumberOfDeletedMessages() >= 20/* gExpungeThreshold */) && GetDeleteIsMoveToTrash() )
// ### 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
}