mirror of https://github.com/M66B/FairEmail.git
Refactoring
This commit is contained in:
parent
87f2a90645
commit
42960e48e8
|
@ -189,12 +189,12 @@ public class ActivityView extends ActivityBilling implements FragmentManager.OnB
|
|||
Log.i("Navigation id=" + item.getId() + " menu=" + item.getMenuId());
|
||||
|
||||
switch (item.getMenuId()) {
|
||||
case R.string.menu_answers:
|
||||
onMenuAnswers();
|
||||
break;
|
||||
case R.string.menu_operations:
|
||||
onMenuOperations();
|
||||
break;
|
||||
case R.string.menu_answers:
|
||||
onMenuAnswers();
|
||||
break;
|
||||
case R.string.menu_setup:
|
||||
onMenuSetup();
|
||||
break;
|
||||
|
@ -932,15 +932,6 @@ public class ActivityView extends ActivityBilling implements FragmentManager.OnB
|
|||
}.execute(this, args, "menu:inbox");
|
||||
}
|
||||
|
||||
private void onMenuAnswers() {
|
||||
if (getLifecycle().getCurrentState().isAtLeast(Lifecycle.State.RESUMED))
|
||||
getSupportFragmentManager().popBackStack("answers", FragmentManager.POP_BACK_STACK_INCLUSIVE);
|
||||
|
||||
FragmentTransaction fragmentTransaction = getSupportFragmentManager().beginTransaction();
|
||||
fragmentTransaction.replace(R.id.content_frame, new FragmentAnswers()).addToBackStack("answers");
|
||||
fragmentTransaction.commit();
|
||||
}
|
||||
|
||||
private void onMenuOperations() {
|
||||
if (getLifecycle().getCurrentState().isAtLeast(Lifecycle.State.RESUMED))
|
||||
getSupportFragmentManager().popBackStack("operations", FragmentManager.POP_BACK_STACK_INCLUSIVE);
|
||||
|
@ -950,6 +941,15 @@ public class ActivityView extends ActivityBilling implements FragmentManager.OnB
|
|||
fragmentTransaction.commit();
|
||||
}
|
||||
|
||||
private void onMenuAnswers() {
|
||||
if (getLifecycle().getCurrentState().isAtLeast(Lifecycle.State.RESUMED))
|
||||
getSupportFragmentManager().popBackStack("answers", FragmentManager.POP_BACK_STACK_INCLUSIVE);
|
||||
|
||||
FragmentTransaction fragmentTransaction = getSupportFragmentManager().beginTransaction();
|
||||
fragmentTransaction.replace(R.id.content_frame, new FragmentAnswers()).addToBackStack("answers");
|
||||
fragmentTransaction.commit();
|
||||
}
|
||||
|
||||
private void onMenuSetup() {
|
||||
startActivity(new Intent(ActivityView.this, ActivitySetup.class));
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue