Prevent disabled primary accounts

pull/215/head
M66B 1 year ago
parent 68e46b0043
commit a3a8000d2d

@ -492,6 +492,7 @@ public class AdapterAccount extends RecyclerView.Adapter<AdapterAccount.ViewHold
popupMenu.getMenu().add(Menu.NONE, R.string.title_account_ondemand, order++, R.string.title_account_ondemand)
.setCheckable(true).setChecked(account.ondemand);
}
if (account.synchronize)
popupMenu.getMenu().add(Menu.NONE, R.string.title_primary, order++, R.string.title_primary)
.setCheckable(true).setChecked(account.primary);
if (parentFragment instanceof FragmentAccounts)
@ -600,6 +601,7 @@ public class AdapterAccount extends RecyclerView.Adapter<AdapterAccount.ViewHold
db.account().setAccountWarning(id, null);
db.account().setAccountError(id, null);
db.account().setAccountConnected(id, null);
db.account().setAccountPrimary(id, false);
}
db.account().setAccountSynchronize(id, sync);

Loading…
Cancel
Save