Quick move single account

pull/209/head
M66B 3 years ago
parent 5b12459592
commit 7c09844f9d

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

Loading…
Cancel
Save