Allow copying POP3 accounts

pull/217/head
M66B 11 months ago
parent 4c5c6c5578
commit a9f172875c

@ -563,13 +563,9 @@ public class AdapterAccount extends RecyclerView.Adapter<AdapterAccount.ViewHold
} }
} }
if (settings) 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_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); popupMenu.getMenu().add(Menu.NONE, R.string.title_copy, order++, R.string.title_copy);
if (settings) {
popupMenu.getMenu().add(Menu.NONE, R.string.title_delete, order++, R.string.title_delete); 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); 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 ContentLoadingProgressBar pbWait;
private long id = -1; private long id = -1;
private long copy = -1;
private int auth = AUTH_TYPE_PASSWORD; private int auth = AUTH_TYPE_PASSWORD;
private String avatar = null; private String avatar = null;
private String calendar = null; private String calendar = null;
@ -146,7 +147,10 @@ public class FragmentPop extends FragmentBase {
// Get arguments // Get arguments
Bundle args = getArguments(); Bundle args = getArguments();
id = args.getLong("id", -1); if (args.getBoolean("copy"))
copy = args.getLong("id", -1);
else
id = args.getLong("id", -1);
} }
@Override @Override
@ -872,7 +876,7 @@ public class FragmentPop extends FragmentBase {
super.onActivityCreated(savedInstanceState); super.onActivityCreated(savedInstanceState);
Bundle args = new Bundle(); Bundle args = new Bundle();
args.putLong("id", id); args.putLong("id", copy < 0 ? id : copy);
new SimpleTask<EntityAccount>() { new SimpleTask<EntityAccount>() {
@Override @Override

Loading…
Cancel
Save