diff options
author | Nicolas Werner <nicolas.werner@hotmail.de> | 2020-05-14 00:41:10 +0200 |
---|---|---|
committer | Nicolas Werner <nicolas.werner@hotmail.de> | 2020-05-14 00:41:10 +0200 |
commit | 279bcd1bf2a052330a51637d8867ae525a3c20a0 (patch) | |
tree | 4c0a6901267879dc22a3717da0cb469db402f411 /src | |
parent | Try to smooth scrolling a bit by increasing cacheBuffer (diff) | |
download | nheko-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.cpp | 4 |
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://", "<img src=\"image://mxcImage/"); + formattedBody_.replace("<img src=\"mxc://", "<img src=\"image://mxcImage/"); + return QVariant(utils::replaceEmoji( utils::linkifyMessage(utils::escapeBlacklistedHtml(formattedBody_)))); } |