Reimplement normal emoji completion

BUG: 460632
This commit is contained in:
Tobias Fella
2022-11-26 02:41:50 +01:00
parent f27b64edef
commit dd0300d025
10 changed files with 40 additions and 13 deletions

View File

@@ -134,6 +134,8 @@ QVariant CustomEmojiModel::data(const QModelIndex &idx, int role) const
case Roles::ModelData:
return QVariant::fromValue(Emoji(QStringLiteral("image://mxc/") + data.url.mid(6), data.name, true));
case Roles::Name:
case Roles::DisplayRole:
case Roles::ReplacedTextRole:
return data.name;
case Roles::ImageURL:
return QUrl(QStringLiteral("image://mxc/") + data.url.mid(6));