diff --git a/Telegram/SourceFiles/core/application.cpp b/Telegram/SourceFiles/core/application.cpp index c2338101b..dd83a0ab2 100644 --- a/Telegram/SourceFiles/core/application.cpp +++ b/Telegram/SourceFiles/core/application.cpp @@ -171,7 +171,7 @@ void Application::run() { DEBUG_LOG(("Application Info: showing.")); _window->firstShow(); - if (cStartToSettings()) { + if (!locked() && cStartToSettings()) { _window->showSettings(); } diff --git a/Telegram/SourceFiles/mainwindow.cpp b/Telegram/SourceFiles/mainwindow.cpp index c692a62ed..17ac35cb9 100644 --- a/Telegram/SourceFiles/mainwindow.cpp +++ b/Telegram/SourceFiles/mainwindow.cpp @@ -241,7 +241,12 @@ void MainWindow::setupMain() { } void MainWindow::showSettings() { - if (isHidden()) showFromTray(); + if (isHidden()) { + showFromTray(); + } + if (_passcodeLock) { + return; + } if (const auto controller = this->controller()) { controller->showSettings(); @@ -253,7 +258,9 @@ void MainWindow::showSettings() { void MainWindow::showSpecialLayer( object_ptr layer, anim::type animated) { - if (_passcodeLock) return; + if (_passcodeLock) { + return; + } if (layer) { ensureLayerCreated();