diff options
Diffstat (limited to 'src/timeline')
-rw-r--r-- | src/timeline/TimelineItem.cpp | 21 | ||||
-rw-r--r-- | src/timeline/TimelineItem.h | 1 |
2 files changed, 1 insertions, 21 deletions
diff --git a/src/timeline/TimelineItem.cpp b/src/timeline/TimelineItem.cpp index fc7868de..e962d468 100644 --- a/src/timeline/TimelineItem.cpp +++ b/src/timeline/TimelineItem.cpp @@ -594,7 +594,7 @@ TimelineItem::markReceived(bool isEncrypted) void TimelineItem::generateBody(const QString &body) { - body_ = new TextLabel(replaceEmoji(body), this); + body_ = new TextLabel(body, this); body_->setTextInteractionFlags(Qt::TextSelectableByMouse | Qt::TextBrowserInteraction); connect(body_, &TextLabel::userProfileTriggered, this, [](const QString &user_id) { @@ -667,25 +667,6 @@ TimelineItem::generateTimestamp(const QDateTime &time) QString("<span style=\"color: #999\"> %1 </span>").arg(time.toString("HH:mm"))); } -QString -TimelineItem::replaceEmoji(const QString &body) -{ - QString fmtBody = ""; - - QVector<uint> utf32_string = body.toUcs4(); - - for (auto &code : utf32_string) { - // TODO: Be more precise here. - if (code > 9000) - fmtBody += QString("<span style=\"font-family: Emoji One;\">") + - QString::fromUcs4(&code, 1) + "</span>"; - else - fmtBody += QString::fromUcs4(&code, 1); - } - - return fmtBody; -} - void TimelineItem::setupAvatarLayout(const QString &userName) { diff --git a/src/timeline/TimelineItem.h b/src/timeline/TimelineItem.h index 9b23a731..8159e370 100644 --- a/src/timeline/TimelineItem.h +++ b/src/timeline/TimelineItem.h @@ -256,7 +256,6 @@ private: //! has been acknowledged by the server. bool isReceived_ = false; - QString replaceEmoji(const QString &body); QString event_id_; QString room_id_; |