mirror of
https://github.com/M66B/FairEmail.git
synced 2025-03-06 11:39:49 +00:00
Refactoring
This commit is contained in:
parent
ae60ef75b8
commit
f628fa0942
1 changed files with 20 additions and 13 deletions
|
@ -691,22 +691,29 @@ public class ActivitySetup extends ActivityBilling implements FragmentManager.On
|
|||
}.execute(this, args, "setup:import");
|
||||
}
|
||||
|
||||
private void onEditAccount(Intent intent) {
|
||||
FragmentAccount fragment = new FragmentAccount();
|
||||
fragment.setArguments(intent.getExtras());
|
||||
FragmentTransaction fragmentTransaction = getSupportFragmentManager().beginTransaction();
|
||||
fragmentTransaction.replace(R.id.content_frame, fragment).addToBackStack("account");
|
||||
fragmentTransaction.commit();
|
||||
}
|
||||
|
||||
private void onEditIdentity(Intent intent) {
|
||||
FragmentIdentity fragment = new FragmentIdentity();
|
||||
fragment.setArguments(intent.getExtras());
|
||||
FragmentTransaction fragmentTransaction = getSupportFragmentManager().beginTransaction();
|
||||
fragmentTransaction.replace(R.id.content_frame, fragment).addToBackStack("identity");
|
||||
fragmentTransaction.commit();
|
||||
}
|
||||
|
||||
BroadcastReceiver receiver = new BroadcastReceiver() {
|
||||
@Override
|
||||
public void onReceive(Context context, Intent intent) {
|
||||
if (ACTION_EDIT_ACCOUNT.equals(intent.getAction())) {
|
||||
FragmentAccount fragment = new FragmentAccount();
|
||||
fragment.setArguments(intent.getExtras());
|
||||
FragmentTransaction fragmentTransaction = getSupportFragmentManager().beginTransaction();
|
||||
fragmentTransaction.replace(R.id.content_frame, fragment).addToBackStack("account");
|
||||
fragmentTransaction.commit();
|
||||
} else if (ACTION_EDIT_IDENTITY.equals(intent.getAction())) {
|
||||
FragmentIdentity fragment = new FragmentIdentity();
|
||||
fragment.setArguments(intent.getExtras());
|
||||
FragmentTransaction fragmentTransaction = getSupportFragmentManager().beginTransaction();
|
||||
fragmentTransaction.replace(R.id.content_frame, fragment).addToBackStack("identity");
|
||||
fragmentTransaction.commit();
|
||||
}
|
||||
if (ACTION_EDIT_ACCOUNT.equals(intent.getAction()))
|
||||
onEditAccount(intent);
|
||||
else if (ACTION_EDIT_IDENTITY.equals(intent.getAction()))
|
||||
onEditIdentity(intent);
|
||||
}
|
||||
};
|
||||
}
|
||||
|
|
Loading…
Add table
Reference in a new issue