Highlight parsing is now done after Ignores have been respected.
In the same commit, because I misunderstood the original issue, I also split out the parsing of the highlights and triggering of the highlight sounds/alerts into separate functions. Fixes #1160 I also re-enabled the "sound url changer" that was commented out in an earlier commit. Fixes #1170
This commit is contained in:
@@ -43,7 +43,9 @@ public:
|
||||
|
||||
QString userName;
|
||||
|
||||
bool isIgnored() const;
|
||||
[[nodiscard]] bool isIgnored() const;
|
||||
// triggerHighlights triggers any alerts or sounds parsed by parseHighlights
|
||||
void triggerHighlights();
|
||||
MessagePtr build();
|
||||
|
||||
private:
|
||||
@@ -52,7 +54,10 @@ private:
|
||||
void appendChannelName();
|
||||
void parseUsername();
|
||||
void appendUsername();
|
||||
void parseHighlights(bool isPastMsg);
|
||||
void runIgnoreReplaces(
|
||||
std::vector<std::tuple<int, EmotePtr, EmoteName>> &twitchEmotes);
|
||||
// parseHighlights only updates the visual state of the message, but leaves the playing of alerts and sounds to the triggerHighlights function
|
||||
void parseHighlights();
|
||||
|
||||
void appendTwitchEmote(
|
||||
const QString &emote,
|
||||
@@ -72,12 +77,17 @@ private:
|
||||
|
||||
QString roomID_;
|
||||
bool hasBits_ = false;
|
||||
bool historicalMessage_ = false;
|
||||
|
||||
QColor usernameColor_;
|
||||
QString originalMessage_;
|
||||
bool senderIsBroadcaster{};
|
||||
|
||||
const bool action_ = false;
|
||||
|
||||
bool highlightVisual_ = false;
|
||||
bool highlightAlert_ = false;
|
||||
bool highlightSound_ = false;
|
||||
};
|
||||
|
||||
} // namespace chatterino
|
||||
|
||||
Reference in New Issue
Block a user