summary refs log tree commit diff
path: root/src/UserSettingsPage.h
diff options
context:
space:
mode:
authorJoseph Donofry <joedonofry@gmail.com>2020-04-21 21:42:17 -0400
committerJoseph Donofry <joedonofry@gmail.com>2020-04-21 22:40:58 -0400
commita4c280a4f927df7de5445d19419fa77f2b603f27 (patch)
tree72da9b3f2ef9187086eab233c45419efa58f17e6 /src/UserSettingsPage.h
parentAdd menu entry to show decrypted source (diff)
downloadnheko-a4c280a4f927df7de5445d19419fa77f2b603f27.tar.xz
Add ability to toggle sidebar messages for encrypted rooms
Diffstat (limited to 'src/UserSettingsPage.h')
-rw-r--r--src/UserSettingsPage.h9
1 files changed, 9 insertions, 0 deletions
diff --git a/src/UserSettingsPage.h b/src/UserSettingsPage.h
index 1c20214e..aff2525a 100644
--- a/src/UserSettingsPage.h
+++ b/src/UserSettingsPage.h
@@ -111,11 +111,18 @@ public:
                 save();
         }
 
+        void setDecryptSidebar(bool state)
+        {
+                decryptSidebar_ = state;
+                save();
+        }
+
         QString theme() const { return !theme_.isEmpty() ? theme_ : defaultTheme_; }
         bool isTrayEnabled() const { return isTrayEnabled_; }
         bool isStartInTrayEnabled() const { return isStartInTrayEnabled_; }
         bool isGroupViewEnabled() const { return isGroupViewEnabled_; }
         bool isAvatarCirclesEnabled() const { return avatarCircles_; }
+        bool isDecryptSidebarEnabled() const { return decryptSidebar_; }
         bool isMarkdownEnabled() const { return isMarkdownEnabled_; }
         bool isTypingNotificationsEnabled() const { return isTypingNotificationsEnabled_; }
         bool isSortByImportanceEnabled() const { return sortByImportance_; }
@@ -147,6 +154,7 @@ private:
         bool isReadReceiptsEnabled_;
         bool hasDesktopNotifications_;
         bool avatarCircles_;
+        bool decryptSidebar_;
         double baseFontSize_;
         QString font_;
         QString emojiFont_;
@@ -199,6 +207,7 @@ private:
         Toggle *markdownEnabled_;
         Toggle *desktopNotifications_;
         Toggle *avatarCircles_;
+        Toggle *decryptSidebar_;
         QLabel *deviceFingerprintValue_;
         QLabel *deviceIdValue_;