summary refs log tree commit diff
path: root/src/timeline/TimelineViewManager.cpp
diff options
context:
space:
mode:
authorNicolas Werner <nicolas.werner@hotmail.de>2021-07-15 00:26:39 +0200
committerNicolas Werner <nicolas.werner@hotmail.de>2021-07-15 00:26:39 +0200
commitbe0576f6a1f8839ac49b9164102b4b0a3bc25a7f (patch)
treea797d1547f9992e34748cdc59fe3a41bdebcde12 /src/timeline/TimelineViewManager.cpp
parentSwitch to room after joining invite (diff)
downloadnheko-be0576f6a1f8839ac49b9164102b4b0a3bc25a7f.tar.xz
Add workaround for TextEdit not rerendering after image loaded
fixes #541
Diffstat (limited to 'src/timeline/TimelineViewManager.cpp')
-rw-r--r--src/timeline/TimelineViewManager.cpp10
1 files changed, 10 insertions, 0 deletions
diff --git a/src/timeline/TimelineViewManager.cpp b/src/timeline/TimelineViewManager.cpp
index b7fd4093..b39ef615 100644
--- a/src/timeline/TimelineViewManager.cpp
+++ b/src/timeline/TimelineViewManager.cpp
@@ -681,3 +681,13 @@ TimelineViewManager::forwardMessageToRoom(mtx::events::collections::TimelineEven
           },
           *e);
 }
+
+//! WORKAROUND(Nico): for https://bugreports.qt.io/browse/QTBUG-93281
+void
+TimelineViewManager::fixImageRendering(QQuickTextDocument *t, QQuickItem *i)
+{
+        if (t) {
+                QObject::connect(
+                  t->textDocument(), SIGNAL(imagesLoaded()), i, SLOT(updateWholeDocument()));
+        }
+}