Fix underlying text from disabled emotes not being colorized after using /me (#3333)

This commit is contained in:
Ryan
2021-10-31 06:37:06 -04:00
committed by GitHub
parent b4b745024c
commit b4be7a4b1f
4 changed files with 19 additions and 10 deletions
+12 -6
View File
@@ -319,7 +319,9 @@ void TwitchMessageBuilder::addWords(
{
// This emote exists right at the start of the word!
this->emplace<EmoteElement>(currentTwitchEmote.ptr,
MessageElementFlag::TwitchEmote);
MessageElementFlag::TwitchEmote,
this->textColor_);
auto len = currentTwitchEmote.name.string.length();
cursor += len;
word = word.mid(len);
@@ -1007,7 +1009,7 @@ Outcome TwitchMessageBuilder::tryAppendEmote(const EmoteName &name)
if (emote)
{
this->emplace<EmoteElement>(emote.get(), flags);
this->emplace<EmoteElement>(emote.get(), flags, this->textColor_);
return Success;
}
@@ -1162,12 +1164,14 @@ Outcome TwitchMessageBuilder::tryParseCheermote(const QString &string)
if (cheerEmote.staticEmote)
{
this->emplace<EmoteElement>(cheerEmote.staticEmote,
MessageElementFlag::BitsStatic);
MessageElementFlag::BitsStatic,
this->textColor_);
}
if (cheerEmote.animatedEmote)
{
this->emplace<EmoteElement>(cheerEmote.animatedEmote,
MessageElementFlag::BitsAnimated);
MessageElementFlag::BitsAnimated,
this->textColor_);
}
if (cheerEmote.color != QColor())
{
@@ -1195,12 +1199,14 @@ Outcome TwitchMessageBuilder::tryParseCheermote(const QString &string)
if (cheerEmote.staticEmote)
{
this->emplace<EmoteElement>(cheerEmote.staticEmote,
MessageElementFlag::BitsStatic);
MessageElementFlag::BitsStatic,
this->textColor_);
}
if (cheerEmote.animatedEmote)
{
this->emplace<EmoteElement>(cheerEmote.animatedEmote,
MessageElementFlag::BitsAnimated);
MessageElementFlag::BitsAnimated,
this->textColor_);
}
if (cheerEmote.color != QColor())
{