Select identity: add

This commit is contained in:
M66B
2023-09-15 21:32:44 +02:00
parent 2a7a4f659a
commit e90392ee6c
2 changed files with 29 additions and 4 deletions

View File

@@ -2481,8 +2481,11 @@ public class FragmentCompose extends FragmentBase {
}
private void onMenuIdentitySelect() {
Bundle args = new Bundle();
args.putBoolean("add", true);
FragmentDialogSelectIdentity fragment = new FragmentDialogSelectIdentity();
fragment.setArguments(new Bundle());
fragment.setArguments(args);
fragment.setTargetFragment(this, REQUEST_SELECT_IDENTITY);
fragment.show(getParentFragmentManager(), "select:identity");
}
@@ -4795,6 +4798,15 @@ public class FragmentCompose extends FragmentBase {
}
private void onSelectIdentity(Bundle args) {
long id = args.getLong("id");
if (id < 0) {
getContext().startActivity(new Intent(getContext(), ActivitySetup.class)
.addFlags(Intent.FLAG_ACTIVITY_NEW_TASK | Intent.FLAG_ACTIVITY_CLEAR_TASK)
.putExtra("manual", true)
.putExtra("scroll", true));
return;
}
new SimpleTask<EntityIdentity>() {
@Override
protected EntityIdentity onExecute(Context context, Bundle args) throws Throwable {