From 00d9374831a6683cc7207169d90cee8239a96d78 Mon Sep 17 00:00:00 2001 From: M66B Date: Wed, 15 May 2019 08:25:23 +0200 Subject: [PATCH] Fixed account folder selection --- app/src/main/java/eu/faircode/email/FragmentAccount.java | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/app/src/main/java/eu/faircode/email/FragmentAccount.java b/app/src/main/java/eu/faircode/email/FragmentAccount.java index 4bfcc9994d..8c7998f682 100644 --- a/app/src/main/java/eu/faircode/email/FragmentAccount.java +++ b/app/src/main/java/eu/faircode/email/FragmentAccount.java @@ -1431,10 +1431,11 @@ public class FragmentAccount extends FragmentBase { none.name = "-"; folders.add(0, none); - adapter.clear(); - for (EntityFolder folder : folders) - if (!EntityFolder.INBOX.equals(folder.type)) - adapter.add(folder); + for (EntityFolder folder : new ArrayList<>(folders)) + if (EntityFolder.INBOX.equals(folder.type)) + folders.remove(folder); + + adapter.addAll(folders); Long left = (account == null ? null : account.swipe_left); Long right = (account == null ? null : account.swipe_right);