mirror of
https://github.com/AyuGram/AyuGramDesktop.git
synced 2025-04-15 21:57:10 +02:00
Show accounts in main menu when added.
This commit is contained in:
parent
7f55fd2cad
commit
dfa4a9990d
3 changed files with 9 additions and 2 deletions
|
@ -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;
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Reference in a new issue