mirror of
https://github.com/AyuGram/AyuGramDesktop.git
synced 2025-04-15 21:57:10 +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() {
|
||||
_passcodeLock = true;
|
||||
enumerateWindows([&](not_null<Window::Controller*> w) {
|
||||
_passcodeLock = true;
|
||||
w->setupPasscodeLock();
|
||||
});
|
||||
hideMediaView();
|
||||
}
|
||||
|
||||
void Application::maybeLockByPasscode() {
|
||||
|
|
|
@ -194,7 +194,6 @@ void MainWindow::setupPasscodeLock() {
|
|||
_passcodeLock.create(bodyWidget(), &controller());
|
||||
updateControlsGeometry();
|
||||
|
||||
Core::App().hideMediaView();
|
||||
ui_hideSettingsAndLayer(anim::type::instant);
|
||||
if (_main) {
|
||||
_main->hide();
|
||||
|
|
|
@ -3380,6 +3380,13 @@ void OverlayWidget::switchToPip() {
|
|||
}) | rpl::start_with_next([=] {
|
||||
_pip = nullptr;
|
||||
}, _pip->lifetime);
|
||||
|
||||
Core::App().passcodeLockChanges(
|
||||
) | rpl::filter(
|
||||
rpl::mappers::_1
|
||||
) | rpl::start_with_next([=] {
|
||||
_pip = nullptr;
|
||||
}, _pip->lifetime);
|
||||
}
|
||||
|
||||
if (isHidden()) {
|
||||
|
|
Loading…
Add table
Reference in a new issue