summary refs log tree commit diff
path: root/src/timeline/TimelineItem.cpp
diff options
context:
space:
mode:
authorKonstantinos Sideris <sideris.konstantin@gmail.com>2018-10-07 13:13:14 +0300
committerKonstantinos Sideris <sideris.konstantin@gmail.com>2018-10-07 13:13:14 +0300
commit4b807229aa20d6f4891e35f08d489da427d3d0b6 (patch)
treead5c7d005429f6fa24fa63934b81086125f0113f /src/timeline/TimelineItem.cpp
parentAdd the correct parent to scaleCombo (diff)
downloadnheko-4b807229aa20d6f4891e35f08d489da427d3d0b6.tar.xz
Remove built-in emoji picker
Diffstat (limited to 'src/timeline/TimelineItem.cpp')
-rw-r--r--src/timeline/TimelineItem.cpp21
1 files changed, 1 insertions, 20 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) {