mirror of
https://github.com/Chatterino/chatterino2.git
synced 2024-11-21 22:24:07 +01:00
render emoji short codes
This commit is contained in:
parent
8adb2d340d
commit
9705570c98
1 changed files with 4 additions and 4 deletions
|
@ -109,9 +109,10 @@ CommandModel *CommandController::createModel(QObject *parent)
|
||||||
return model;
|
return model;
|
||||||
}
|
}
|
||||||
|
|
||||||
QString CommandController::execCommand(const QString &text, ChannelPtr channel,
|
QString CommandController::execCommand(const QString &textNoEmoji, ChannelPtr channel,
|
||||||
bool dryRun)
|
bool dryRun)
|
||||||
{
|
{
|
||||||
|
QString text = getApp()->emotes->emojis.replaceShortCodes(textNoEmoji);
|
||||||
QStringList words = text.split(' ', QString::SkipEmptyParts);
|
QStringList words = text.split(' ', QString::SkipEmptyParts);
|
||||||
Command command;
|
Command command;
|
||||||
|
|
||||||
|
@ -177,9 +178,8 @@ QString CommandController::execCommand(const QString &text, ChannelPtr channel,
|
||||||
}
|
}
|
||||||
} // bttv/ffz emote
|
} // bttv/ffz emote
|
||||||
{ // emoji/text
|
{ // emoji/text
|
||||||
for (auto &variant : app->emotes->emojis.parse(
|
for (auto &variant :
|
||||||
app->emotes->emojis.replaceShortCodes(
|
app->emotes->emojis.parse(words[i])) {
|
||||||
words[i]))) {
|
|
||||||
constexpr const static struct {
|
constexpr const static struct {
|
||||||
void operator()(EmotePtr emote,
|
void operator()(EmotePtr emote,
|
||||||
MessageBuilder &b) const
|
MessageBuilder &b) const
|
||||||
|
|
Loading…
Reference in a new issue