Allow copying POP3 accounts

This commit is contained in:
M66B
2024-10-15 21:43:51 +02:00
parent 4c5c6c5578
commit a9f172875c
2 changed files with 8 additions and 8 deletions

View File

@@ -563,13 +563,9 @@ public class AdapterAccount extends RecyclerView.Adapter<AdapterAccount.ViewHold
}
}
if (settings)
popupMenu.getMenu().add(Menu.NONE, R.string.title_edit_properties, order++, R.string.title_edit_properties);
if (account.protocol == EntityAccount.TYPE_IMAP && settings)
popupMenu.getMenu().add(Menu.NONE, R.string.title_copy, order++, R.string.title_copy);
if (settings) {
popupMenu.getMenu().add(Menu.NONE, R.string.title_edit_properties, order++, R.string.title_edit_properties);
popupMenu.getMenu().add(Menu.NONE, R.string.title_copy, order++, R.string.title_copy);
popupMenu.getMenu().add(Menu.NONE, R.string.title_delete, order++, R.string.title_delete);
popupMenu.getMenu().add(Menu.NONE, R.string.title_log, order++, R.string.title_log);
}

View File

@@ -129,6 +129,7 @@ public class FragmentPop extends FragmentBase {
private ContentLoadingProgressBar pbWait;
private long id = -1;
private long copy = -1;
private int auth = AUTH_TYPE_PASSWORD;
private String avatar = null;
private String calendar = null;
@@ -146,7 +147,10 @@ public class FragmentPop extends FragmentBase {
// Get arguments
Bundle args = getArguments();
id = args.getLong("id", -1);
if (args.getBoolean("copy"))
copy = args.getLong("id", -1);
else
id = args.getLong("id", -1);
}
@Override
@@ -872,7 +876,7 @@ public class FragmentPop extends FragmentBase {
super.onActivityCreated(savedInstanceState);
Bundle args = new Bundle();
args.putLong("id", id);
args.putLong("id", copy < 0 ? id : copy);
new SimpleTask<EntityAccount>() {
@Override