Bug 1352859 - Avoid behavior change when delete model is "Just mark it as deleted". r=jorgk,mkmelin
In this model no uid expunge will occur so a moved message will show in
mbox with Red X and strike-through instead of disappearing. For other
models, a moved message will disappear and, if UIDPLUS supported, the
moved message will be expunged from the source mbox.
--- a/mailnews/imap/src/nsImapProtocol.cpp
+++ b/mailnews/imap/src/nsImapProtocol.cpp
@@ -3027,17 +3027,21 @@ void nsImapProtocol::ProcessSelectedStat
Expunge();
}
else
{
// Check if UIDPLUS capable so we can just expunge emails we just
// copied and marked as deleted. This prevents expunging emails
// that other clients may have marked as deleted in the mailbox
// and don't want them to disappear.
- if (GetServerStateParser().GetCapabilityFlag() & kUidplusCapability)
+ // Only do UidExpunge() when user selected delete method is "Move
+ // it to this folder" or "Remove it immediately", not when the
+ // delete method is "Just mark it as deleted".
+ if (!GetShowDeletedMessages() &&
+ (GetServerStateParser().GetCapabilityFlag() & kUidplusCapability))
{
UidExpunge(messageIdString);
}
}
}
if (m_imapMailFolderSink)
{
copyState = storeSuccessful ? (ImapOnlineCopyState) ImapOnlineCopyStateType::kSuccessfulDelete