mirror of
https://github.com/M66B/FairEmail.git
synced 2024-12-25 01:06:04 +00:00
Added setings menu item for account start screen
This commit is contained in:
parent
72d26f1752
commit
df058782ba
1 changed files with 14 additions and 0 deletions
|
@ -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);
|
||||
|
|
Loading…
Reference in a new issue