Sent message, junk and trash should not be archived

This commit is contained in:
M66B 2020-10-11 09:21:57 +02:00
parent b334505334
commit e20a43debb
1 changed files with 2 additions and 1 deletions

View File

@ -1593,6 +1593,7 @@ public class AdapterMessage extends RecyclerView.Adapter<AdapterMessage.ViewHold
hasJunk = true;
boolean inArchive = EntityFolder.ARCHIVE.equals(message.folderType);
boolean inSent = EntityFolder.SENT.equals(message.folderType);
boolean inTrash = EntityFolder.TRASH.equals(message.folderType);
boolean inJunk = EntityFolder.JUNK.equals(message.folderType);
boolean outbox = EntityFolder.OUTBOX.equals(message.folderType);
@ -1600,7 +1601,7 @@ public class AdapterMessage extends RecyclerView.Adapter<AdapterMessage.ViewHold
boolean move = !(message.folderReadOnly || message.uid == null) ||
(message.accountProtocol == EntityAccount.TYPE_POP &&
EntityFolder.TRASH.equals(message.folderType));
boolean archive = (move && (hasArchive && !inArchive));
boolean archive = (move && (hasArchive && !inArchive && !inSent && !inTrash && !inJunk));
boolean trash = (move || outbox || debug ||
message.accountProtocol == EntityAccount.TYPE_POP);
boolean junk = (move && (hasJunk && !inJunk));