mirror of
https://github.com/M66B/FairEmail.git
synced 2026-04-04 16:16:33 +02:00
Allow copying POP3 accounts
This commit is contained in:
@@ -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);
|
||||
}
|
||||
|
||||
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user