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
+6 -2
View File
@@ -8,6 +8,8 @@
#include <QColor>
#include <QUrl>
#include <optional>
namespace chatterino {
class Badge;
@@ -57,6 +59,9 @@ protected:
// parseHighlights only updates the visual state of the message, but leaves the playing of alerts and sounds to the triggerHighlights function
virtual void parseHighlights();
static void triggerHighlights(const QString &channelName, bool playSound,
const std::optional<QUrl> &customSoundUrl,
bool windowAlert);
void appendChannelName();
@@ -72,8 +77,7 @@ protected:
bool highlightAlert_ = false;
bool highlightSound_ = false;
QUrl highlightSoundUrl_;
std::optional<QUrl> highlightSoundCustomUrl_{};
};
} // namespace chatterino