mirror of
https://github.com/M66B/FairEmail.git
synced 2026-05-19 13:34:00 +02:00
Single account is primary
This commit is contained in:
@@ -208,6 +208,13 @@ public class FairEmailBackupAgent extends BackupAgent {
|
||||
db.account().getAccountByUUID(account.uuid) != null)
|
||||
continue;
|
||||
|
||||
if (jaccounts.length() == 1)
|
||||
account.primary = true;
|
||||
|
||||
EntityAccount primary = db.account().getPrimaryAccount();
|
||||
if (primary != null)
|
||||
account.primary = false;
|
||||
|
||||
if (account.auth_type == ServiceAuthenticator.AUTH_TYPE_GMAIL)
|
||||
account.synchronize = false;
|
||||
|
||||
|
||||
@@ -947,6 +947,9 @@ public class FragmentOptionsBackup extends FragmentBase implements SharedPrefere
|
||||
Long aid = account.id;
|
||||
account.id = null;
|
||||
|
||||
if (jaccounts.length() == 1)
|
||||
account.primary = true;
|
||||
|
||||
EntityAccount primary = db.account().getPrimaryAccount();
|
||||
if (primary != null)
|
||||
account.primary = false;
|
||||
|
||||
Reference in New Issue
Block a user