Fixed POP3 move to trash

This commit is contained in:
M66B 2020-05-28 08:38:23 +02:00
parent 9db851be98
commit be6cb71fb2
1 changed files with 6 additions and 3 deletions

View File

@ -2399,9 +2399,12 @@ public class FragmentMessages extends FragmentBase implements SharedPreferences.
}
for (EntityAccount account : accounts.values()) {
boolean hasArchive = (db.folder().getFolderByType(account.id, EntityFolder.ARCHIVE) != null);
boolean hasTrash = (db.folder().getFolderByType(account.id, EntityFolder.TRASH) != null);
boolean hasJunk = (db.folder().getFolderByType(account.id, EntityFolder.JUNK) != null);
boolean hasArchive = (account.protocol == EntityAccount.TYPE_IMAP &&
db.folder().getFolderByType(account.id, EntityFolder.ARCHIVE) != null);
boolean hasTrash = (account.protocol == EntityAccount.TYPE_IMAP &&
db.folder().getFolderByType(account.id, EntityFolder.TRASH) != null);
boolean hasJunk = (account.protocol == EntityAccount.TYPE_IMAP &&
db.folder().getFolderByType(account.id, EntityFolder.JUNK) != null);
result.hasArchive = (result.hasArchive == null ? hasArchive : result.hasArchive && hasArchive);
result.hasTrash = (result.hasTrash == null ? hasTrash : result.hasTrash && hasTrash);