From d02679915c6825907733aafd52886f3f30a213d9 Mon Sep 17 00:00:00 2001 From: M66B Date: Wed, 21 Aug 2019 18:35:33 +0200 Subject: [PATCH] Folders that cannot hold messages are not selectable --- app/src/main/java/eu/faircode/email/Core.java | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/app/src/main/java/eu/faircode/email/Core.java b/app/src/main/java/eu/faircode/email/Core.java index 48bb84c1fb..be169ce775 100644 --- a/app/src/main/java/eu/faircode/email/Core.java +++ b/app/src/main/java/eu/faircode/email/Core.java @@ -885,7 +885,8 @@ class Core { boolean subscribed = subscription.contains(fullName); String[] attr = ((IMAPFolder) ifolder).getAttributes(); String type = EntityFolder.getType(attr, fullName, false); - boolean selectable = !Arrays.asList(attr).contains("\\Noselect"); + boolean selectable = !Arrays.asList(attr).contains("\\Noselect") && + ((ifolder.getType() & IMAPFolder.HOLDS_MESSAGES) != 0); if (EntityFolder.INBOX.equals(type) || fullName.equals(childName)) childName = null;