summary refs log tree commit diff
path: root/src
diff options
context:
space:
mode:
authorNicolas Werner <nicolas.werner@hotmail.de>2020-05-14 00:41:10 +0200
committerNicolas Werner <nicolas.werner@hotmail.de>2020-05-14 00:41:10 +0200
commit279bcd1bf2a052330a51637d8867ae525a3c20a0 (patch)
tree4c0a6901267879dc22a3717da0cb469db402f411 /src
parentTry to smooth scrolling a bit by increasing cacheBuffer (diff)
downloadnheko-279bcd1bf2a052330a51637d8867ae525a3c20a0.tar.xz
Show inline images
(This is such a hack and will probably break, but it works for now for
most cases...)
Diffstat (limited to 'src')
-rw-r--r--src/timeline/TimelineModel.cpp4
1 files changed, 4 insertions, 0 deletions
diff --git a/src/timeline/TimelineModel.cpp b/src/timeline/TimelineModel.cpp

index 99656d19..b7e90034 100644 --- a/src/timeline/TimelineModel.cpp +++ b/src/timeline/TimelineModel.cpp
@@ -294,6 +294,10 @@ TimelineModel::data(const QString &id, int role) const if (isReply) formattedBody_ = formattedBody_.remove(replyFallback); } + + formattedBody_.replace("<img src=\"mxc:&#47;&#47;", "<img src=\"image://mxcImage/"); + formattedBody_.replace("<img src=\"mxc://", "<img src=\"image://mxcImage/"); + return QVariant(utils::replaceEmoji( utils::linkifyMessage(utils::escapeBlacklistedHtml(formattedBody_)))); }