Add highlight color and show in mentions to automod messages (#5215)

This commit is contained in:
KleberPF
2024-03-09 08:03:36 -03:00
committed by GitHub
parent ecad4b052a
commit c50791972d
13 changed files with 69 additions and 10 deletions
+13 -1
View File
@@ -373,7 +373,19 @@ void MessageLayout::updateBuffer(QPixmap *buffer,
else if (this->message_->flags.has(MessageFlag::AutoMod) ||
this->message_->flags.has(MessageFlag::LowTrustUsers))
{
backgroundColor = QColor("#404040");
if (ctx.preferences.enableAutomodHighlight &&
(this->message_->flags.has(MessageFlag::AutoModOffendingMessage) ||
this->message_->flags.has(
MessageFlag::AutoModOffendingMessageHeader)))
{
backgroundColor = blendColors(
backgroundColor,
*ctx.colorProvider.color(ColorType::AutomodHighlight));
}
else
{
backgroundColor = QColor("#404040");
}
}
else if (this->message_->flags.has(MessageFlag::Debug))
{