mirror of
https://github.com/M66B/FairEmail.git
synced 2026-04-02 15:17:03 +02:00
Small improvement
This commit is contained in:
@@ -176,8 +176,15 @@ public class ActivityError extends ActivityBase {
|
||||
long account = args.getLong("account");
|
||||
|
||||
DB db = DB.getInstance(context);
|
||||
List<EntityIdentity> identities = db.identity().getSynchronizingIdentities(account);
|
||||
return (identities == null || identities.size() != 1 ? null : identities.get(0));
|
||||
List<EntityIdentity> identities = db.identity().getIdentities(account);
|
||||
if (identities == null)
|
||||
return null;
|
||||
if (identities.size() == 1)
|
||||
return identities.get(0);
|
||||
for (EntityIdentity identity : identities)
|
||||
if (identity.primary)
|
||||
return identity;
|
||||
return null;
|
||||
}
|
||||
|
||||
@Override
|
||||
|
||||
Reference in New Issue
Block a user