diff options
author | DeepBlueV7.X <nicolas.werner@hotmail.de> | 2022-02-21 00:27:22 +0000 |
---|---|---|
committer | GitHub <noreply@github.com> | 2022-02-21 00:27:22 +0000 |
commit | fd25f6ee91770dfa4cfcd1e2b70307330eaaa2e1 (patch) | |
tree | 69622f12690da8bd57071e9695fa215641156386 | |
parent | Merge pull request #946 from maltee1/mobile_usersettings (diff) | |
parent | Prefer empty() over length() (diff) | |
download | nheko-fd25f6ee91770dfa4cfcd1e2b70307330eaaa2e1.tar.xz |
Merge pull request #934 from pavlukivan/master
use shortcode as a fallback for custom emote title
-rw-r--r-- | src/CombinedImagePackModel.cpp | 4 |
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: |