remember the status of showing accounts

This commit is contained in:
luvletter2333 2021-09-20 21:41:25 +08:00
parent 5ca6f284e4
commit b3e16dca87
No known key found for this signature in database
GPG Key ID: BFD68B892BECC1D8
1 changed files with 2 additions and 1 deletions

View File

@ -57,7 +57,7 @@ public class DrawerLayoutAdapter extends RecyclerListView.SelectionAdapter imple
public DrawerLayoutAdapter(Context context, SideMenultItemAnimator animator) {
mContext = context;
itemAnimator = animator;
accountsShown = UserConfig.getActivatedAccountsCount() > 1 && MessagesController.getGlobalMainSettings().getBoolean("accountsShown", true);
accountsShown = MessagesController.getGlobalMainSettings().getBoolean("accountsShown", true);
Theme.createCommonDialogResources(context);
resetItems();
try {
@ -85,6 +85,7 @@ public class DrawerLayoutAdapter extends RecyclerListView.SelectionAdapter imple
return;
}
accountsShown = value;
MessagesController.getGlobalMainSettings().edit().putBoolean("accountsShown", accountsShown).apply();
if (profileCell != null) {
profileCell.setAccountsShown(accountsShown, animated);
}