2
0
mirror of https://github.com/telegramdesktop/tdesktop synced 2025-09-01 15:05:56 +00:00

Fix crash on quit in idle state.

This commit is contained in:
John Preston
2021-05-18 14:16:04 +04:00
parent 9144f4ea7b
commit f7454a4284
3 changed files with 18 additions and 7 deletions

View File

@@ -82,7 +82,7 @@ void Controller::showAccount(not_null<Main::Account*> account) {
_sessionController->filtersMenuChanged(
) | rpl::start_with_next([=] {
sideBarChanged();
}, session->lifetime());
}, _sessionController->lifetime());
}
if (session && session->settings().dialogsFiltersEnabled()) {
_sessionController->toggleFiltersMenu(true);
@@ -93,11 +93,18 @@ void Controller::showAccount(not_null<Main::Account*> account) {
if (session) {
setupMain();
session->updates().isIdleValue(
) | rpl::filter([=](bool idle) {
return !idle;
}) | rpl::start_with_next([=] {
widget()->checkHistoryActivation();
}, _sessionController->lifetime());
session->termsLockValue(
) | rpl::start_with_next([=] {
checkLockByTerms();
_widget.updateGlobalMenu();
}, _lifetime);
}, _sessionController->lifetime());
} else {
setupIntro();
_widget.updateGlobalMenu();