Make PrivacyScreen work on Popped-out Rooms

pull/1082/head
Joseph Donofry 3 years ago
parent d130c96160
commit 7f2ae13c43
No known key found for this signature in database
GPG Key ID: E8A1D78EF044B0CB
  1. 1
      resources/qml/ChatPage.qml
  2. 8
      resources/qml/PrivacyScreen.qml
  3. 9
      resources/qml/RoomList.qml

@ -143,6 +143,7 @@ Rectangle {
visible: Settings.privacyScreen
screenTimeout: Settings.privacyScreenTimeout
timelineRoot: adaptiveView
windowTarget: MainWindow
}
}

@ -14,9 +14,11 @@ Item {
property var timelineRoot
property int screenTimeout
required property var windowTarget
Connections {
function onActiveChanged() {
if (MainWindow.active) {
if (windowTarget.active) {
screenSaverTimer.stop();
screenSaver.state = "Invisible";
} else {
@ -26,14 +28,14 @@ Item {
}
}
target: MainWindow
target: windowTarget
}
Timer {
id: screenSaverTimer
interval: screenTimeout * 1000
running: !MainWindow.active
running: !windowTarget.active
onTriggered: {
screenSaver.state = "Visible";
}

@ -92,10 +92,19 @@ Page {
}
TimelineView {
id: timelineView
anchors.fill: parent
room: roomWindowW.room
roomPreview: roomWindowW.roomPreview.roomid ? roomWindowW.roomPreview : null
}
PrivacyScreen {
anchors.fill: parent
visible: Settings.privacyScreen
screenTimeout: Settings.privacyScreenTimeout
timelineRoot: timelineView
windowTarget: roomWindowW
}
}
}

Loading…
Cancel
Save