Copy accounts is a settings action

pull/161/head
M66B 5 years ago
parent ffec52b765
commit 85aa5cfc7f

@ -214,6 +214,7 @@ public class AdapterAccount extends RecyclerView.Adapter<AdapterAccount.ViewHold
popupMenu.getMenu().add(Menu.NONE, R.string.title_edit_channel, 2, R.string.title_edit_channel); popupMenu.getMenu().add(Menu.NONE, R.string.title_edit_channel, 2, R.string.title_edit_channel);
} }
if (settings)
popupMenu.getMenu().add(Menu.NONE, R.string.title_copy, 3, R.string.title_copy); popupMenu.getMenu().add(Menu.NONE, R.string.title_copy, 3, R.string.title_copy);
popupMenu.setOnMenuItemClickListener(new PopupMenu.OnMenuItemClickListener() { popupMenu.setOnMenuItemClickListener(new PopupMenu.OnMenuItemClickListener() {
@ -281,7 +282,7 @@ public class AdapterAccount extends RecyclerView.Adapter<AdapterAccount.ViewHold
private void onActionCopy() { private void onActionCopy() {
LocalBroadcastManager lbm = LocalBroadcastManager.getInstance(context); LocalBroadcastManager lbm = LocalBroadcastManager.getInstance(context);
lbm.sendBroadcast( lbm.sendBroadcast(
new Intent(settings ? ActivitySetup.ACTION_EDIT_ACCOUNT : ActivityView.ACTION_VIEW_FOLDERS) new Intent(ActivitySetup.ACTION_EDIT_ACCOUNT)
.putExtra("id", account.id) .putExtra("id", account.id)
.putExtra("copy", true)); .putExtra("copy", true));
} }

Loading…
Cancel
Save