Scope setup-email gate to auxiliary windows and URLs

Task: 2026/08/03/establish-setup-email-gate-window-scope
This commit is contained in:
John Preston
2026-08-04 09:49:30 +04:00
parent 4a8d7fc7d9
commit ab20eb86c9
2 changed files with 5 additions and 1 deletions

View File

@@ -1147,6 +1147,9 @@ bool Application::canApplyLangPackWithoutRestart() const {
}
void Application::checkStartUrls() {
if (_setupEmailLock.current()) {
return;
}
if (!Core::App().passcodeLocked()) {
cRefStartUrls() = ranges::views::all(
cRefStartUrls()
@@ -1318,6 +1321,7 @@ rpl::producer<bool> Application::passcodeLockValue() const {
void Application::lockBySetupEmail() {
_setupEmailLock = true;
closeAdditionalWindows();
enumerateWindows([&](not_null<Window::Controller*> w) {
w->setupSetupEmailLock();
});
@@ -1328,6 +1332,7 @@ void Application::unlockSetupEmail() {
enumerateWindows([&](not_null<Window::Controller*> w) {
w->clearSetupEmailLock();
});
checkStartUrls();
}
bool Application::someSessionExists() const {

View File

@@ -248,7 +248,6 @@ void MainWindow::clearSetupEmailLock() {
_main->show();
updateControlsGeometry();
_main->showAnimated(std::move(oldContentCache), true);
Core::App().checkStartUrls();
}
}