summary refs log tree commit diff
path: root/src/timeline/TimelineModel.cpp
diff options
context:
space:
mode:
authorNicolas Werner <nicolas.werner@hotmail.de>2020-04-14 19:29:22 +0200
committerNicolas Werner <nicolas.werner@hotmail.de>2020-04-14 19:29:22 +0200
commitc739a0422d3c8d6c93a4b05646d256f02c189d8d (patch)
treee0d4db2b7da818993a69a553e51e18403330d6d5 /src/timeline/TimelineModel.cpp
parentUpdate translations (diff)
downloadnheko-c739a0422d3c8d6c93a4b05646d256f02c189d8d.tar.xz
Fix encrypted event indicator
Diffstat (limited to 'src/timeline/TimelineModel.cpp')
-rw-r--r--src/timeline/TimelineModel.cpp10
1 files changed, 5 insertions, 5 deletions
diff --git a/src/timeline/TimelineModel.cpp b/src/timeline/TimelineModel.cpp
index d54677f7..35de082a 100644
--- a/src/timeline/TimelineModel.cpp
+++ b/src/timeline/TimelineModel.cpp
@@ -579,12 +579,12 @@ TimelineModel::internalAddEvents(
 
                 if (auto event =
                       std::get_if<mtx::events::EncryptedEvent<mtx::events::msg::Encrypted>>(&e)) {
-                        e = decryptEvent(*event).event;
-                }
-                auto encInfo = mtx::accessors::file(e);
+                        auto e_      = decryptEvent(*event).event;
+                        auto encInfo = mtx::accessors::file(e_);
 
-                if (encInfo)
-                        emit newEncryptedImage(encInfo.value());
+                        if (encInfo)
+                                emit newEncryptedImage(encInfo.value());
+                }
 
                 this->events.insert(id, e);
                 ids.push_back(id);