diff --git a/src/controllers/notifications/NotificationController.cpp b/src/controllers/notifications/NotificationController.cpp index 653db98c9..9b4c417e6 100644 --- a/src/controllers/notifications/NotificationController.cpp +++ b/src/controllers/notifications/NotificationController.cpp @@ -180,13 +180,13 @@ void NotificationController::getFakeTwitchChannelLiveStatus( getApp()->notifications->playSound(); } if (getSettings()->notificationFlashTaskbar) { + int flashDuration = 2500; if (getSettings()->longAlerts) { - QApplication::alert( - getApp()->windows->getMainWindow().window(), 0); - } else { - QApplication::alert( - getApp()->windows->getMainWindow().window(), 2500); + flashDuration = 0; } + QApplication::alert( + getApp()->windows->getMainWindow().window(), + flashDuration); } } return Success; diff --git a/src/providers/twitch/TwitchChannel.cpp b/src/providers/twitch/TwitchChannel.cpp index 55d9b6506..76f0e09f8 100644 --- a/src/providers/twitch/TwitchChannel.cpp +++ b/src/providers/twitch/TwitchChannel.cpp @@ -408,14 +408,13 @@ void TwitchChannel::setLive(bool newLiveStatus) getApp()->notifications->playSound(); } if (getSettings()->notificationFlashTaskbar) { + int flashDuration = 2500; if (getSettings()->longAlerts) { - QApplication::alert( - getApp()->windows->getMainWindow().window(), 0); - } else { - QApplication::alert( - getApp()->windows->getMainWindow().window(), - 2500); + flashDuration = 0; } + QApplication::alert( + getApp()->windows->getMainWindow().window(), + flashDuration); } } auto live = makeSystemMessage(this->getName() + " is live"); diff --git a/src/providers/twitch/TwitchMessageBuilder.cpp b/src/providers/twitch/TwitchMessageBuilder.cpp index 16c967b1a..c923e29b7 100644 --- a/src/providers/twitch/TwitchMessageBuilder.cpp +++ b/src/providers/twitch/TwitchMessageBuilder.cpp @@ -788,13 +788,12 @@ void TwitchMessageBuilder::parseHighlights(bool isPastMsg) } if (doAlert) { + int flashDuration = 2500; if (getSettings()->longAlerts) { - QApplication::alert( - getApp()->windows->getMainWindow().window(), 0); - } else { - QApplication::alert( - getApp()->windows->getMainWindow().window(), 2500); + flashDuration = 0; } + QApplication::alert(getApp()->windows->getMainWindow().window(), + flashDuration); } } }