mirror of
https://github.com/M66B/FairEmail.git
synced 2026-03-29 05:15:13 +02:00
Update unique accounts only
This commit is contained in:
@@ -770,8 +770,13 @@ public class FragmentOAuth extends FragmentBase {
|
||||
try {
|
||||
db.beginTransaction();
|
||||
|
||||
if (args.getBoolean("update"))
|
||||
update = db.account().getAccount(username, AUTH_TYPE_OAUTH);
|
||||
if (args.getBoolean("update")) {
|
||||
List<EntityAccount> accounts =
|
||||
db.account().getAccounts(username, AUTH_TYPE_OAUTH);
|
||||
if (accounts != null && accounts.size() == 1)
|
||||
update = accounts.get(0);
|
||||
}
|
||||
|
||||
if (update == null) {
|
||||
EntityAccount primary = db.account().getPrimaryAccount();
|
||||
|
||||
|
||||
Reference in New Issue
Block a user