summary refs log tree commit diff
path: root/src
diff options
context:
space:
mode:
authorDeepBlueV7.X <nicolas.werner@hotmail.de>2022-02-21 00:27:22 +0000
committerGitHub <noreply@github.com>2022-02-21 00:27:22 +0000
commitfd25f6ee91770dfa4cfcd1e2b70307330eaaa2e1 (patch)
tree69622f12690da8bd57071e9695fa215641156386 /src
parentMerge pull request #946 from maltee1/mobile_usersettings (diff)
parentPrefer empty() over length() (diff)
downloadnheko-fd25f6ee91770dfa4cfcd1e2b70307330eaaa2e1.tar.xz
Merge pull request #934 from pavlukivan/master
use shortcode as a fallback for custom emote title
Diffstat (limited to 'src')
-rw-r--r--src/CombinedImagePackModel.cpp4
1 files changed, 3 insertions, 1 deletions
diff --git a/src/CombinedImagePackModel.cpp b/src/CombinedImagePackModel.cpp

index 27b96b92..6dadbef4 100644 --- a/src/CombinedImagePackModel.cpp +++ b/src/CombinedImagePackModel.cpp
@@ -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.empty() + ? 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: