2
0
mirror of https://github.com/telegramdesktop/tdesktop synced 2025-08-31 22:46:10 +00:00

Show accounts in main menu when added.

This commit is contained in:
John Preston
2020-07-02 22:11:45 +04:00
parent 7f55fd2cad
commit dfa4a9990d
3 changed files with 9 additions and 2 deletions

View File

@@ -270,6 +270,13 @@ not_null<Main::Account*> Domain::add(MTP::Environment environment) {
_local->startAdded(account, std::move(config));
watchSession(account);
_accountsChanges.fire({});
auto &settings = Core::App().settings();
if (_accounts.size() == 2 && !settings.mainMenuAccountsShown()) {
settings.setMainMenuAccountsShown(true);
Core::App().saveSettingsDelayed();
}
return account;
}