summary refs log tree commit diff
diff options
context:
space:
mode:
authorJoseph Donofry <joedonofry@gmail.com>2021-02-01 18:57:59 -0500
committerJoseph Donofry <joedonofry@gmail.com>2021-02-01 18:57:59 -0500
commit1127aa7c91718ceec82ac0a775935b62b5220724 (patch)
treeccae974933ba0038e6b51a62da0532d351a0b764
parentMerge remote-tracking branch 'nheko-im/master' into privacy_screen (diff)
downloadnheko-1127aa7c91718ceec82ac0a775935b62b5220724.tar.xz
Small UX fixes
-rw-r--r--resources/qml/PrivacyScreen.qml4
-rw-r--r--src/MainWindow.cpp4
2 files changed, 5 insertions, 3 deletions
diff --git a/resources/qml/PrivacyScreen.qml b/resources/qml/PrivacyScreen.qml
index 14a175f9..f3e388ce 100644
--- a/resources/qml/PrivacyScreen.qml
+++ b/resources/qml/PrivacyScreen.qml
@@ -18,7 +18,9 @@ Item {
                 screenSaverTimer.stop();
                 screenSaver.state = "Invisible";
             } else {
-                screenSaverTimer.start();
+                if (timelineRoot.visible) {
+                    screenSaverTimer.start();
+                }
             }
         }
     }
diff --git a/src/MainWindow.cpp b/src/MainWindow.cpp
index 8fd5c7e2..ab3c2cf2 100644
--- a/src/MainWindow.cpp
+++ b/src/MainWindow.cpp
@@ -59,6 +59,8 @@ MainWindow::MainWindow(QWidget *parent)
   : QMainWindow(parent)
   , userSettings_{UserSettings::instance()}
 {
+        instance_ = this;
+
         setWindowTitle(0);
         setObjectName("MainWindow");
 
@@ -312,8 +314,6 @@ MainWindow::showChatPage()
                 &Cache::secretChanged,
                 userSettingsPage_,
                 &UserSettingsPage::updateSecretStatus);
-
-        instance_ = this;
 }
 
 void