summary refs log tree commit diff
path: root/src/timeline/TimelineViewManager.cpp
diff options
context:
space:
mode:
authorNicolas Werner <nicolas.werner@hotmail.de>2019-12-03 23:34:16 +0100
committerNicolas Werner <nicolas.werner@hotmail.de>2019-12-03 23:34:16 +0100
commit5bfdaff7780bc4299c3edab85c688eebf21f7d4e (patch)
treecf558f40eb7953a890cb03df98bcecc52d288e6c /src/timeline/TimelineViewManager.cpp
parentlint (diff)
downloadnheko-5bfdaff7780bc4299c3edab85c688eebf21f7d4e.tar.xz
Implement decryption of images
It is a bit of a hack, but it works...
Diffstat (limited to '')
-rw-r--r--src/timeline/TimelineViewManager.cpp11
1 files changed, 8 insertions, 3 deletions
diff --git a/src/timeline/TimelineViewManager.cpp b/src/timeline/TimelineViewManager.cpp
index c44bcbbf..25f72a6d 100644
--- a/src/timeline/TimelineViewManager.cpp
+++ b/src/timeline/TimelineViewManager.cpp
@@ -102,9 +102,14 @@ TimelineViewManager::sync(const mtx::responses::Rooms &rooms)
 void
 TimelineViewManager::addRoom(const QString &room_id)
 {
-        if (!models.contains(room_id))
-                models.insert(room_id,
-                              QSharedPointer<TimelineModel>(new TimelineModel(this, room_id)));
+        if (!models.contains(room_id)) {
+                QSharedPointer<TimelineModel> newRoom(new TimelineModel(this, room_id));
+                connect(newRoom.data(),
+                        &TimelineModel::newEncryptedImage,
+                        imgProvider,
+                        &MxcImageProvider::addEncryptionInfo);
+                models.insert(room_id, std::move(newRoom));
+        }
 }
 
 void