mirror of
https://github.com/telegramdesktop/tdesktop
synced 2025-08-31 06:26:18 +00:00
Show accounts in main menu when added.
This commit is contained in:
@@ -458,7 +458,7 @@ void Settings::resetOnLastLogout() {
|
||||
//_videoPipGeometry = QByteArray();
|
||||
_dictionariesEnabled = std::vector<int>();
|
||||
_autoDownloadDictionaries = true;
|
||||
_mainMenuAccountsShown = false;
|
||||
_mainMenuAccountsShown = true;
|
||||
_tabbedSelectorSectionEnabled = false; // per-window
|
||||
_floatPlayerColumn = Window::Column::Second; // per-window
|
||||
_floatPlayerCorner = RectPart::TopRight; // per-window
|
||||
|
@@ -464,7 +464,7 @@ private:
|
||||
QByteArray _videoPipGeometry;
|
||||
rpl::variable<std::vector<int>> _dictionariesEnabled;
|
||||
rpl::variable<bool> _autoDownloadDictionaries = true;
|
||||
rpl::variable<bool> _mainMenuAccountsShown = false;
|
||||
rpl::variable<bool> _mainMenuAccountsShown = true;
|
||||
bool _tabbedSelectorSectionEnabled = false; // per-window
|
||||
Window::Column _floatPlayerColumn; // per-window
|
||||
RectPart _floatPlayerCorner; // per-window
|
||||
|
@@ -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;
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user