diff --git a/Telegram/SourceFiles/main/main_accounts.cpp b/Telegram/SourceFiles/main/main_accounts.cpp index f1124eece..c65e535fe 100644 --- a/Telegram/SourceFiles/main/main_accounts.cpp +++ b/Telegram/SourceFiles/main/main_accounts.cpp @@ -44,14 +44,14 @@ Storage::StartResult Accounts::start(const QByteArray &passcode) { if (result == Storage::StartResult::Success) { Assert(started()); - activate(active); - for (const auto &[index, account] : _accounts) { account->startMtp(); } if (Local::oldSettingsVersion() < AppVersion) { Local::writeSettings(); } + + activate(active); } else { Assert(!started()); } diff --git a/Telegram/SourceFiles/main/main_session.cpp b/Telegram/SourceFiles/main/main_session.cpp index 8c1bf9cde..7c6061c69 100644 --- a/Telegram/SourceFiles/main/main_session.cpp +++ b/Telegram/SourceFiles/main/main_session.cpp @@ -108,8 +108,6 @@ Session::Session( } }); - Window::Theme::Background()->start(); - #ifndef TDESKTOP_DISABLE_SPELLCHECK Spellchecker::Start(this); #endif // TDESKTOP_DISABLE_SPELLCHECK diff --git a/Telegram/SourceFiles/window/window_controller.cpp b/Telegram/SourceFiles/window/window_controller.cpp index 310e63074..b6fcc4c23 100644 --- a/Telegram/SourceFiles/window/window_controller.cpp +++ b/Telegram/SourceFiles/window/window_controller.cpp @@ -39,6 +39,8 @@ Controller::~Controller() { } void Controller::showAccount(not_null account) { + Window::Theme::Background()->start(); + _accountLifetime.destroy(); _account = account;