Add Basic Elevated Message support (#4016)
This commit is contained in:
@@ -133,6 +133,20 @@ void ColorProvider::initTypeColorMap()
|
||||
std::make_shared<QColor>(
|
||||
HighlightPhrase::FALLBACK_FIRST_MESSAGE_HIGHLIGHT_COLOR)});
|
||||
}
|
||||
|
||||
customColor = getSettings()->elevatedMessageHighlightColor;
|
||||
if (QColor(customColor).isValid())
|
||||
{
|
||||
this->typeColorMap_.insert({ColorType::ElevatedMessageHighlight,
|
||||
std::make_shared<QColor>(customColor)});
|
||||
}
|
||||
else
|
||||
{
|
||||
this->typeColorMap_.insert(
|
||||
{ColorType::ElevatedMessageHighlight,
|
||||
std::make_shared<QColor>(
|
||||
HighlightPhrase::FALLBACK_ELEVATED_MESSAGE_HIGHLIGHT_COLOR)});
|
||||
}
|
||||
}
|
||||
|
||||
void ColorProvider::initDefaultColors()
|
||||
|
||||
@@ -13,6 +13,7 @@ enum class ColorType {
|
||||
Whisper,
|
||||
RedeemedHighlight,
|
||||
FirstMessageHighlight,
|
||||
ElevatedMessageHighlight,
|
||||
};
|
||||
|
||||
class ColorProvider
|
||||
|
||||
@@ -198,6 +198,11 @@ MessagePtr TwitchMessageBuilder::build()
|
||||
this->message().flags.set(MessageFlag::FirstMessage);
|
||||
}
|
||||
|
||||
if (this->tags.contains("pinned-chat-paid-amount"))
|
||||
{
|
||||
this->message().flags.set(MessageFlag::ElevatedMessage);
|
||||
}
|
||||
|
||||
// reply threads
|
||||
if (this->thread_)
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user