mirror of
https://github.com/Nheko-Reborn/nheko.git
synced 2024-11-25 12:38:48 +03:00
Merge pull request #934 from pavlukivan/master
use shortcode as a fallback for custom emote title
This commit is contained in:
commit
fd25f6ee91
1 changed files with 3 additions and 1 deletions
|
@ -60,7 +60,9 @@ CombinedImagePackModel::data(const QModelIndex &index, int role) const
|
||||||
return QStringLiteral(
|
return QStringLiteral(
|
||||||
"<img data-mx-emoticon height=32 src=\"%1\" alt=\"%2\" title=\"%2\">")
|
"<img data-mx-emoticon height=32 src=\"%1\" alt=\"%2\" title=\"%2\">")
|
||||||
.arg(QString::fromStdString(images[index.row()].image.url).toHtmlEscaped(),
|
.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:
|
case Roles::Url:
|
||||||
return QString::fromStdString(images[index.row()].image.url);
|
return QString::fromStdString(images[index.row()].image.url);
|
||||||
case CompletionModel::SearchRole:
|
case CompletionModel::SearchRole:
|
||||||
|
|
Loading…
Reference in a new issue