|
|
|
@ -520,6 +520,9 @@ public class AdapterAccount extends RecyclerView.Adapter<AdapterAccount.ViewHold
|
|
|
|
|
popupMenu.getMenu().add(Menu.NONE, R.string.title_log, order++, R.string.title_log);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
if (!settings)
|
|
|
|
|
popupMenu.getMenu().add(Menu.NONE, R.string.menu_setup, order++, R.string.menu_setup);
|
|
|
|
|
|
|
|
|
|
if (debug || BuildConfig.DEBUG) {
|
|
|
|
|
popupMenu.getMenu().add(Menu.NONE, R.string.title_reset, order++, R.string.title_reset);
|
|
|
|
|
popupMenu.getMenu().add(Menu.NONE, R.string.title_setup_oauth_authorize, order++, R.string.title_setup_oauth_authorize);
|
|
|
|
@ -565,6 +568,9 @@ public class AdapterAccount extends RecyclerView.Adapter<AdapterAccount.ViewHold
|
|
|
|
|
} else if (itemId == R.string.title_log) {
|
|
|
|
|
onActionLog();
|
|
|
|
|
return true;
|
|
|
|
|
} else if (itemId == R.string.menu_setup) {
|
|
|
|
|
onActionSettings();
|
|
|
|
|
return true;
|
|
|
|
|
} else if (itemId == R.string.title_reset) {
|
|
|
|
|
onActionReset();
|
|
|
|
|
return true;
|
|
|
|
@ -813,6 +819,14 @@ public class AdapterAccount extends RecyclerView.Adapter<AdapterAccount.ViewHold
|
|
|
|
|
fragmentTransaction.commit();
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
private void onActionSettings() {
|
|
|
|
|
context.startActivity(new Intent(context, ActivitySetup.class)
|
|
|
|
|
.addFlags(Intent.FLAG_ACTIVITY_NEW_TASK | Intent.FLAG_ACTIVITY_CLEAR_TASK)
|
|
|
|
|
.putExtra("target", "accounts")
|
|
|
|
|
.putExtra("id", account.id)
|
|
|
|
|
.putExtra("protocol", account.protocol));
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
private void onActionReset() {
|
|
|
|
|
Bundle args = new Bundle();
|
|
|
|
|
args.putLong("id", account.id);
|
|
|
|
|