From be6cb71fb2e88bb9329e5c54f8287793282a52d9 Mon Sep 17 00:00:00 2001 From: M66B Date: Thu, 28 May 2020 08:38:23 +0200 Subject: [PATCH] Fixed POP3 move to trash --- .../main/java/eu/faircode/email/FragmentMessages.java | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/app/src/main/java/eu/faircode/email/FragmentMessages.java b/app/src/main/java/eu/faircode/email/FragmentMessages.java index 99bdca3dd6..b3ce71863b 100644 --- a/app/src/main/java/eu/faircode/email/FragmentMessages.java +++ b/app/src/main/java/eu/faircode/email/FragmentMessages.java @@ -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);