Select primary account/identity

This commit is contained in:
M66B 2019-12-18 15:46:15 +01:00
parent 584fb600b6
commit c678e37bbf
1 changed files with 7 additions and 2 deletions

View File

@ -2597,8 +2597,13 @@ public class FragmentCompose extends FragmentBase {
long aid = args.getLong("account", -1); long aid = args.getLong("account", -1);
long iid = args.getLong("identity", -1); long iid = args.getLong("identity", -1);
if (aid < 0 && ref != null) if (aid < 0)
aid = ref.account; if (ref == null) {
EntityAccount primary = db.account().getPrimaryAccount();
if (primary != null)
aid = primary.id;
} else
aid = ref.account;
if (iid < 0 && ref != null && ref.identity != null) if (iid < 0 && ref != null && ref.identity != null)
iid = ref.identity; iid = ref.identity;