Fix first main window appearance.

This commit is contained in:
John Preston 2020-06-16 10:48:21 +04:00
parent ab5796c117
commit 5e045ec02c
3 changed files with 4 additions and 4 deletions

View file

@ -44,14 +44,14 @@ Storage::StartResult Accounts::start(const QByteArray &passcode) {
if (result == Storage::StartResult::Success) { if (result == Storage::StartResult::Success) {
Assert(started()); Assert(started());
activate(active);
for (const auto &[index, account] : _accounts) { for (const auto &[index, account] : _accounts) {
account->startMtp(); account->startMtp();
} }
if (Local::oldSettingsVersion() < AppVersion) { if (Local::oldSettingsVersion() < AppVersion) {
Local::writeSettings(); Local::writeSettings();
} }
activate(active);
} else { } else {
Assert(!started()); Assert(!started());
} }

View file

@ -108,8 +108,6 @@ Session::Session(
} }
}); });
Window::Theme::Background()->start();
#ifndef TDESKTOP_DISABLE_SPELLCHECK #ifndef TDESKTOP_DISABLE_SPELLCHECK
Spellchecker::Start(this); Spellchecker::Start(this);
#endif // TDESKTOP_DISABLE_SPELLCHECK #endif // TDESKTOP_DISABLE_SPELLCHECK

View file

@ -39,6 +39,8 @@ Controller::~Controller() {
} }
void Controller::showAccount(not_null<Main::Account*> account) { void Controller::showAccount(not_null<Main::Account*> account) {
Window::Theme::Background()->start();
_accountLifetime.destroy(); _accountLifetime.destroy();
_account = account; _account = account;