diff --git a/Telegram/SourceFiles/platform/linux/main_window_linux.cpp b/Telegram/SourceFiles/platform/linux/main_window_linux.cpp index de3344fe2..c1bd15985 100644 --- a/Telegram/SourceFiles/platform/linux/main_window_linux.cpp +++ b/Telegram/SourceFiles/platform/linux/main_window_linux.cpp @@ -873,7 +873,7 @@ void MainWindow::createGlobalMenu() { App::wnd()->showFromTray(); } - if (!account().sessionExists()) { + if (!sessionController()) { return; } @@ -1027,7 +1027,7 @@ void MainWindow::updateGlobalMenuHook() { canDelete = list->canDeleteSelected(); } App::wnd()->updateIsActive(); - const auto logged = account().sessionExists(); + const auto logged = (sessionController() != nullptr); const auto inactive = !logged || controller().locked(); const auto support = logged && account().session().supportMode(); ForceDisabled(psLogout, !logged && !Core::App().passcodeLocked()); diff --git a/Telegram/SourceFiles/platform/mac/main_window_mac.mm b/Telegram/SourceFiles/platform/mac/main_window_mac.mm index 186ed848c..4fd80c628 100644 --- a/Telegram/SourceFiles/platform/mac/main_window_mac.mm +++ b/Telegram/SourceFiles/platform/mac/main_window_mac.mm @@ -729,7 +729,7 @@ void MainWindow::createGlobalMenu() { if (isHidden()) { App::wnd()->showFromTray(); } - if (!account().sessionExists()) { + if (!sessionController()) { return; } Ui::show(Box(std::make_unique(sessionController()), [](not_null box) { @@ -835,7 +835,7 @@ void MainWindow::updateGlobalMenuHook() { [_private->_touchBar showInputFieldItem:showTouchBarItem]; } App::wnd()->updateIsActive(); - const auto logged = account().sessionExists(); + const auto logged = (sessionController() != nullptr); const auto inactive = !logged || controller().locked(); const auto support = logged && account().session().supportMode(); ForceDisabled(psLogout, !logged && !Core::App().passcodeLocked());