Add option to play highlight sounds even if Chatterino is focused.
This is off by default
This commit is contained in:
@@ -412,6 +412,9 @@ void TwitchMessageBuilder::parseHighlights()
|
||||
bool doHighlight = false;
|
||||
bool playSound = false;
|
||||
bool doAlert = false;
|
||||
|
||||
bool hasFocus = (QApplication::focusWidget() != nullptr);
|
||||
|
||||
if (!blackList.contains(this->ircMessage->nick(), Qt::CaseInsensitive)) {
|
||||
for (const Highlight &highlight : activeHighlights) {
|
||||
if (this->originalMessage.contains(highlight.target, Qt::CaseInsensitive)) {
|
||||
@@ -437,7 +440,7 @@ void TwitchMessageBuilder::parseHighlights()
|
||||
|
||||
this->setHighlight(doHighlight);
|
||||
|
||||
if (playSound) {
|
||||
if (playSound && (!hasFocus || settings.highlightAlwaysPlaySound)) {
|
||||
player->play();
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user