Quick move single account

This commit is contained in:
M66B 2022-07-02 08:37:27 +02:00
parent 5b12459592
commit 7c09844f9d
1 changed files with 7 additions and 4 deletions

View File

@ -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<Long> folders;
EntityAccount account;
Map<EntityAccount, Boolean> 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<EntityAccount> syncing = db.account().getSynchronizingAccounts(EntityAccount.TYPE_IMAP);