summary refs log tree commit diff
path: root/resources/qml
diff options
context:
space:
mode:
authorJoseph Donofry <joedonofry@gmail.com>2021-02-01 18:42:18 -0500
committerJoseph Donofry <joedonofry@gmail.com>2021-02-01 18:42:18 -0500
commitd59910a8f298b13cc90e436a6f6efa325d863180 (patch)
tree989a31353178e7d4f7c72f4ca677fc08c1318228 /resources/qml
parentImplement Privacy Screen (diff)
downloadnheko-d59910a8f298b13cc90e436a6f6efa325d863180.tar.xz
Remove redundant import and fix visible warning
Diffstat (limited to 'resources/qml')
-rw-r--r--resources/qml/PrivacyScreen.qml10
-rw-r--r--resources/qml/TimelineView.qml1
2 files changed, 6 insertions, 5 deletions
diff --git a/resources/qml/PrivacyScreen.qml b/resources/qml/PrivacyScreen.qml
index 45ae5cb5..14a175f9 100644
--- a/resources/qml/PrivacyScreen.qml
+++ b/resources/qml/PrivacyScreen.qml
@@ -29,10 +29,12 @@ Item {
         interval: screenTimeout * 1000
         running: true
         onTriggered: {
-            timelineRoot.grabToImage(function(result) {
-                screenSaver.state = "Visible";
-                imageSource = result.url;
-            }, Qt.size(width, height));
+            if (MainWindow.visible) {
+                timelineRoot.grabToImage(function(result) {
+                    screenSaver.state = "Visible";
+                    imageSource = result.url;
+                }, Qt.size(width, height));
+            }
         }
     }
 
diff --git a/resources/qml/TimelineView.qml b/resources/qml/TimelineView.qml
index 35d09d5a..379b19fb 100644
--- a/resources/qml/TimelineView.qml
+++ b/resources/qml/TimelineView.qml
@@ -1,4 +1,3 @@
-import "."
 import "./delegates"
 import "./device-verification"
 import "./emoji"