diff --git a/app/src/main/java/eu/faircode/email/FragmentMessages.java b/app/src/main/java/eu/faircode/email/FragmentMessages.java index ed165a4f37..ee97afa4c0 100644 --- a/app/src/main/java/eu/faircode/email/FragmentMessages.java +++ b/app/src/main/java/eu/faircode/email/FragmentMessages.java @@ -1431,10 +1431,9 @@ public class FragmentMessages extends FragmentBase implements SharedPreferences. if (result == null) return; - if (result.accounts.size() == 1) { - for (EntityAccount account : result.accounts.keySet()) - onActionMoveSelectionAccount(account.id, false, result.folders); - } else { + if (result.account != null) + onActionMoveSelectionAccount(result.account.id, false, result.folders); + else { PopupMenuLifecycle popupMenu = new PopupMenuLifecycle(v.getContext(), getViewLifecycleOwner(), ibMove); int order = 0; @@ -9849,6 +9848,7 @@ public class FragmentMessages extends FragmentBase implements SharedPreferences. Boolean leave_deleted; boolean read_only; List folders; + EntityAccount account; Map accounts; EntityAccount copyto; @@ -10033,6 +10033,9 @@ public class FragmentMessages extends FragmentBase implements SharedPreferences. if (result.hasTrash == null) result.hasTrash = false; if (result.hasJunk == null) result.hasJunk = false; + if (!result.hasPop && accounts.size() == 1) + result.account = accounts.values().iterator().next(); + result.accounts = new LinkedHashMap<>(); if (!result.hasPop) { List syncing = db.account().getSynchronizingAccounts(EntityAccount.TYPE_IMAP);