mirror of
https://github.com/M66B/FairEmail.git
synced 2025-03-01 09:16:00 +00:00
Single account is primary
This commit is contained in:
parent
ac716f66a5
commit
2b3eba1a57
2 changed files with 10 additions and 0 deletions
|
@ -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;
|
||||
|
|
Loading…
Reference in a new issue