refactor: turn StreamerMode into a singleton(-like thing) (#5216)
This commit is contained in:
@@ -9,6 +9,7 @@
|
||||
#include "providers/twitch/TwitchIrcServer.hpp"
|
||||
#include "providers/twitch/TwitchMessageBuilder.hpp"
|
||||
#include "singletons/Settings.hpp"
|
||||
#include "singletons/StreamerMode.hpp"
|
||||
#include "singletons/Toasts.hpp"
|
||||
#include "singletons/WindowManager.hpp"
|
||||
#include "util/Helpers.hpp"
|
||||
@@ -186,14 +187,15 @@ void NotificationController::checkStream(bool live, QString channelName)
|
||||
getIApp()->getToasts()->sendChannelNotification(channelName, QString(),
|
||||
Platform::Twitch);
|
||||
}
|
||||
bool inStreamerMode = getIApp()->getStreamerMode()->isEnabled();
|
||||
if (getSettings()->notificationPlaySound &&
|
||||
!(isInStreamerMode() &&
|
||||
!(inStreamerMode &&
|
||||
getSettings()->streamerModeSuppressLiveNotifications))
|
||||
{
|
||||
getIApp()->getNotifications()->playSound();
|
||||
}
|
||||
if (getSettings()->notificationFlashTaskbar &&
|
||||
!(isInStreamerMode() &&
|
||||
!(inStreamerMode &&
|
||||
getSettings()->streamerModeSuppressLiveNotifications))
|
||||
{
|
||||
getIApp()->getWindows()->sendAlert();
|
||||
|
||||
Reference in New Issue
Block a user