feat: add sound and flash alert for automod caught messages (#5026)

Co-authored-by: Rasmus Karlsson <rasmus.karlsson@pajlada.com>
This commit is contained in:
iProdigy
2023-12-25 17:17:44 -06:00
committed by GitHub
parent 1006bf955a
commit eb12cfa50b
19 changed files with 348 additions and 193 deletions
+7 -3
View File
@@ -342,9 +342,13 @@ void MessageLayout::updateBuffer(QPixmap *buffer,
this->message_->flags.has(MessageFlag::HighlightedWhisper)) &&
!this->flags.has(MessageLayoutFlag::IgnoreHighlights))
{
// Blend highlight color with usual background color
backgroundColor =
blendColors(backgroundColor, *this->message_->highlightColor);
assert(this->message_->highlightColor);
if (this->message_->highlightColor)
{
// Blend highlight color with usual background color
backgroundColor =
blendColors(backgroundColor, *this->message_->highlightColor);
}
}
else if (this->message_->flags.has(MessageFlag::Subscription) &&
ctx.preferences.enableSubHighlight)
@@ -47,6 +47,12 @@ void MessagePreferences::connectSettings(Settings *settings,
},
holder);
settings->enableAutomodHighlight.connect(
[this](const auto &newValue) {
this->enableAutomodHighlight = newValue;
},
holder);
settings->alternateMessages.connect(
[this](const auto &newValue) {
this->alternateMessages = newValue;
@@ -39,6 +39,7 @@ struct MessagePreferences {
bool enableElevatedMessageHighlight{};
bool enableFirstMessageHighlight{};
bool enableSubHighlight{};
bool enableAutomodHighlight{};
bool alternateMessages{};
bool separateMessages{};