mirror of https://github.com/M66B/FairEmail.git
Fixed navigation
This commit is contained in:
parent
9b4649d3d8
commit
16bea88b20
|
@ -268,9 +268,20 @@ public class ActivitySetup extends ActivityBilling implements FragmentManager.On
|
|||
getSupportFragmentManager().addOnBackStackChangedListener(this);
|
||||
|
||||
if (getSupportFragmentManager().getFragments().size() == 0) {
|
||||
Intent intent = getIntent();
|
||||
String target = intent.getStringExtra("target");
|
||||
|
||||
FragmentTransaction fragmentTransaction = getSupportFragmentManager().beginTransaction();
|
||||
fragmentTransaction.replace(R.id.content_frame, new FragmentSetup()).addToBackStack("setup");
|
||||
if ("accounts".equals(target))
|
||||
fragmentTransaction.replace(R.id.content_frame, new FragmentAccounts()).addToBackStack("accounts");
|
||||
else
|
||||
fragmentTransaction.replace(R.id.content_frame, new FragmentSetup()).addToBackStack("setup");
|
||||
fragmentTransaction.commit();
|
||||
|
||||
if (intent.hasExtra("target")) {
|
||||
intent.removeExtra("target");
|
||||
setIntent(intent);
|
||||
}
|
||||
}
|
||||
|
||||
if (savedInstanceState != null)
|
||||
|
|
|
@ -170,9 +170,9 @@ public class FragmentFolders extends FragmentBase {
|
|||
fabError.setOnClickListener(new View.OnClickListener() {
|
||||
@Override
|
||||
public void onClick(View v) {
|
||||
FragmentTransaction fragmentTransaction = getFragmentManager().beginTransaction();
|
||||
fragmentTransaction.replace(R.id.content_frame, new FragmentAccounts()).addToBackStack("accounts");
|
||||
fragmentTransaction.commit();
|
||||
Intent intent = new Intent(getContext(), ActivitySetup.class)
|
||||
.putExtra("target", "accounts");
|
||||
startActivity(intent);
|
||||
}
|
||||
});
|
||||
|
||||
|
|
Loading…
Reference in New Issue