mirror of
https://github.com/AyuGram/AyuGramDesktop.git
synced 2025-06-05 06:33:57 +02:00
Close PiP when a passcode lock is enabled.
This commit is contained in:
parent
91e6c42fcf
commit
7557a20679
3 changed files with 9 additions and 2 deletions
|
@ -1118,10 +1118,11 @@ void Application::updateWindowTitles() {
|
||||||
}
|
}
|
||||||
|
|
||||||
void Application::lockByPasscode() {
|
void Application::lockByPasscode() {
|
||||||
|
_passcodeLock = true;
|
||||||
enumerateWindows([&](not_null<Window::Controller*> w) {
|
enumerateWindows([&](not_null<Window::Controller*> w) {
|
||||||
_passcodeLock = true;
|
|
||||||
w->setupPasscodeLock();
|
w->setupPasscodeLock();
|
||||||
});
|
});
|
||||||
|
hideMediaView();
|
||||||
}
|
}
|
||||||
|
|
||||||
void Application::maybeLockByPasscode() {
|
void Application::maybeLockByPasscode() {
|
||||||
|
|
|
@ -194,7 +194,6 @@ void MainWindow::setupPasscodeLock() {
|
||||||
_passcodeLock.create(bodyWidget(), &controller());
|
_passcodeLock.create(bodyWidget(), &controller());
|
||||||
updateControlsGeometry();
|
updateControlsGeometry();
|
||||||
|
|
||||||
Core::App().hideMediaView();
|
|
||||||
ui_hideSettingsAndLayer(anim::type::instant);
|
ui_hideSettingsAndLayer(anim::type::instant);
|
||||||
if (_main) {
|
if (_main) {
|
||||||
_main->hide();
|
_main->hide();
|
||||||
|
|
|
@ -3380,6 +3380,13 @@ void OverlayWidget::switchToPip() {
|
||||||
}) | rpl::start_with_next([=] {
|
}) | rpl::start_with_next([=] {
|
||||||
_pip = nullptr;
|
_pip = nullptr;
|
||||||
}, _pip->lifetime);
|
}, _pip->lifetime);
|
||||||
|
|
||||||
|
Core::App().passcodeLockChanges(
|
||||||
|
) | rpl::filter(
|
||||||
|
rpl::mappers::_1
|
||||||
|
) | rpl::start_with_next([=] {
|
||||||
|
_pip = nullptr;
|
||||||
|
}, _pip->lifetime);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (isHidden()) {
|
if (isHidden()) {
|
||||||
|
|
Loading…
Add table
Reference in a new issue