summary refs log tree commit diff
path: root/src/timeline/TimelineModel.cpp
diff options
context:
space:
mode:
authorJoseph Donofry <joedonofry@gmail.com>2020-04-23 19:05:44 -0400
committerJoseph Donofry <joedonofry@gmail.com>2020-04-23 19:05:44 -0400
commit994edb836c0e812933cabf5e0b57f2f8aaaba9a7 (patch)
tree981be524b41498e0d18df43d29270efbed808474 /src/timeline/TimelineModel.cpp
parentFix own messages not showing as encrypted (diff)
downloadnheko-994edb836c0e812933cabf5e0b57f2f8aaaba9a7.tar.xz
Change how decrypt value is retrieved from settings
Diffstat (limited to 'src/timeline/TimelineModel.cpp')
-rw-r--r--src/timeline/TimelineModel.cpp6
1 files changed, 6 insertions, 0 deletions
diff --git a/src/timeline/TimelineModel.cpp b/src/timeline/TimelineModel.cpp
index ff1f324e..75819532 100644
--- a/src/timeline/TimelineModel.cpp
+++ b/src/timeline/TimelineModel.cpp
@@ -514,6 +514,12 @@ TimelineModel::updateLastMessage()
 {
         // Get the user setting to show decrypted messages in side bar
         bool decrypt = QSettings().value("user/decrypt_sidebar", true).toBool();
+        updateLastMessage(decrypt);
+}
+
+void
+TimelineModel::updateLastMessage(bool decrypt)
+{
         for (auto it = eventOrder.begin(); it != eventOrder.end(); ++it) {
                 auto event = events.value(*it);
                 if (auto e = std::get_if<mtx::events::EncryptedEvent<mtx::events::msg::Encrypted>>(