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);
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_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,6 +147,9 @@ public class FragmentPop extends FragmentBase {
// Get arguments
Bundle args = getArguments();
if (args.getBoolean("copy"))
copy = args.getLong("id", -1);
else
id = args.getLong("id", -1);
}
@ -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

Loading…
Cancel
Save