Skip to content
Snippets Groups Projects
Commit 2a2ef2f2 authored by Ivan Pavluk's avatar Ivan Pavluk
Browse files

use shortcode as a fallback for custom emote title

Some clients (e.g. FluffyChat) don't have a UI for specifying the emote
title, and instead use the shortcode as the title. This sets the title
accordingly even if the emote was added through such a client and only
has a shortcode.
parent dfb8f9a1
No related branches found
No related tags found
No related merge requests found
Pipeline #2622 passed
......@@ -60,7 +60,9 @@ CombinedImagePackModel::data(const QModelIndex &index, int role) const
return QStringLiteral(
"<img data-mx-emoticon height=32 src=\"%1\" alt=\"%2\" title=\"%2\">")
.arg(QString::fromStdString(images[index.row()].image.url).toHtmlEscaped(),
QString::fromStdString(images[index.row()].image.body));
images[index.row()].image.body.length() > 0
? QString::fromStdString(images[index.row()].image.body)
: images[index.row()].shortcode);
case Roles::Url:
return QString::fromStdString(images[index.row()].image.url);
case CompletionModel::SearchRole:
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment