Update widget on save account

This commit is contained in:
M66B 2020-05-23 09:04:24 +02:00
parent 300f402a90
commit 15de2fd467
1 changed files with 16 additions and 10 deletions

View File

@ -1229,18 +1229,24 @@ public class FragmentAccount extends FragmentBase {
fragment.setArguments(aargs); fragment.setArguments(aargs);
fragment.setTargetFragment(FragmentAccount.this, REQUEST_SAVE); fragment.setTargetFragment(FragmentAccount.this, REQUEST_SAVE);
fragment.show(getParentFragmentManager(), "account:save"); fragment.show(getParentFragmentManager(), "account:save");
} else if (getLifecycle().getCurrentState().isAtLeast(Lifecycle.State.STARTED)) { } else {
getParentFragmentManager().popBackStack(); Context context = getContext();
if (context != null)
WidgetUnified.updateData(context); // Update color stripe
if (cbIdentity.isChecked()) { if (getLifecycle().getCurrentState().isAtLeast(Lifecycle.State.STARTED)) {
Bundle aargs = new Bundle(); getParentFragmentManager().popBackStack();
aargs.putLong("account", args.getLong("account"));
FragmentIdentity fragment = new FragmentIdentity(); if (cbIdentity.isChecked()) {
fragment.setArguments(aargs); Bundle aargs = new Bundle();
FragmentTransaction fragmentTransaction = getParentFragmentManager().beginTransaction(); aargs.putLong("account", args.getLong("account"));
fragmentTransaction.replace(R.id.content_frame, fragment).addToBackStack("identity");
fragmentTransaction.commit(); FragmentIdentity fragment = new FragmentIdentity();
fragment.setArguments(aargs);
FragmentTransaction fragmentTransaction = getParentFragmentManager().beginTransaction();
fragmentTransaction.replace(R.id.content_frame, fragment).addToBackStack("identity");
fragmentTransaction.commit();
}
} }
} }
} }