Added Live Notification suppression to Streamer Mode (#2342)

This commit is contained in:
Paweł
2021-01-10 15:01:38 +01:00
committed by GitHub
parent 78aae8e93f
commit acbabd2664
6 changed files with 17 additions and 7 deletions
@@ -173,11 +173,15 @@ void NotificationController::getFakeTwitchChannelLiveStatus(
getApp()->toasts->sendChannelNotification(channelName,
Platform::Twitch);
}
if (getSettings()->notificationPlaySound)
if (getSettings()->notificationPlaySound &&
!(isInStreamerMode() &&
getSettings()->streamerModeSupressLiveNotifications))
{
getApp()->notifications->playSound();
}
if (getSettings()->notificationFlashTaskbar)
if (getSettings()->notificationFlashTaskbar &&
!(isInStreamerMode() &&
getSettings()->streamerModeSupressLiveNotifications))
{
getApp()->windows->sendAlert();
}
+2
View File
@@ -193,6 +193,8 @@ public:
BoolSetting streamerModeHideViewerCountAndDuration = {
"/streamerMode/hideViewerCountAndDuration", false};
BoolSetting streamerModeMuteMentions = {"/streamerMode/muteMentions", true};
BoolSetting streamerModeSupressLiveNotifications = {
"/streamerMode/supressLiveNotifications", false};
/// Ignored Phrases
QStringSetting ignoredPhraseReplace = {"/ignore/ignoredPhraseReplace",
+3 -1
View File
@@ -38,7 +38,9 @@ bool Toasts::isEnabled()
{
#ifdef Q_OS_WIN
return WinToastLib::WinToast::isCompatible() &&
getSettings()->notificationToast;
getSettings()->notificationToast &&
!(isInStreamerMode() &&
getSettings()->streamerModeSupressLiveNotifications);
#else
return false;
#endif
@@ -346,6 +346,8 @@ void GeneralPage::initLayout(GeneralPageView &layout)
"Hide viewer count and stream length while hovering over split header",
s.streamerModeHideViewerCountAndDuration);
layout.addCheckbox("Mute mention sounds", s.streamerModeMuteMentions);
layout.addCheckbox("Supress Live Notifications",
s.streamerModeSupressLiveNotifications);
layout.addTitle("Link Previews");
layout.addDescription(
@@ -29,9 +29,9 @@ NotificationPage::NotificationPage()
{
auto settings = tabs.appendTab(new QVBoxLayout, "Options");
{
settings.emplace<QLabel>("You can be informed when certain "
"channels go live. You can be "
"informed in multiple ways:");
settings.emplace<QLabel>(
"You can be informed when certain channels go live. You "
"can be informed in multiple ways:");
settings.append(this->createCheckBox(
"Flash taskbar", getSettings()->notificationFlashTaskbar));