mirror of
https://hubproxy.babadafafafafa.cn/https://github.com/telegramdesktop/tdesktop
synced 2026-09-20 08:03:45 +08:00
Scope setup-email gate to auxiliary windows and URLs
Task: 2026/08/03/establish-setup-email-gate-window-scope
This commit is contained in:
@@ -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 {
|
||||
|
||||
@@ -248,7 +248,6 @@ void MainWindow::clearSetupEmailLock() {
|
||||
_main->show();
|
||||
updateControlsGeometry();
|
||||
_main->showAnimated(std::move(oldContentCache), true);
|
||||
Core::App().checkStartUrls();
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user