diff --git a/CHANGELOG.md b/CHANGELOG.md index 92c09c6db..a59380f31 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -3,7 +3,7 @@ ## Unversioned - Major: Added "Channel Filters". See https://wiki.chatterino.com/Filters/ for how they work or how to configure them. (#1748, #2083, #2090, #2200) -- Major: Added Streamer Mode configuration (under `Settings -> General`), where you can select which features of Chatterino should behave differently when you are in Streamer Mode. (#2001, #2316) +- Major: Added Streamer Mode configuration (under `Settings -> General`), where you can select which features of Chatterino should behave differently when you are in Streamer Mode. (#2001, #2316, #2342) - Major: Color mentions to match the mentioned users. You can disable this by unchecking "Color @usernames" under `Settings -> General -> Advanced (misc.)`. (#1963, #2284) - Minor: Added a button to the split context menu to open the moderation view for a channel when the account selected has moderator permissions. (#2321) - Minor: Made BetterTTV emote tooltips use authors' display name. (#2267) diff --git a/src/controllers/notifications/NotificationController.cpp b/src/controllers/notifications/NotificationController.cpp index 7ca106eb9..a973d1851 100644 --- a/src/controllers/notifications/NotificationController.cpp +++ b/src/controllers/notifications/NotificationController.cpp @@ -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(); } diff --git a/src/singletons/Settings.hpp b/src/singletons/Settings.hpp index 72214a1c3..7f9ed3d84 100644 --- a/src/singletons/Settings.hpp +++ b/src/singletons/Settings.hpp @@ -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", diff --git a/src/singletons/Toasts.cpp b/src/singletons/Toasts.cpp index 1f627a22e..37ff05538 100644 --- a/src/singletons/Toasts.cpp +++ b/src/singletons/Toasts.cpp @@ -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 diff --git a/src/widgets/settingspages/GeneralPage.cpp b/src/widgets/settingspages/GeneralPage.cpp index 5a7c85d1c..557db35dd 100644 --- a/src/widgets/settingspages/GeneralPage.cpp +++ b/src/widgets/settingspages/GeneralPage.cpp @@ -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( diff --git a/src/widgets/settingspages/NotificationPage.cpp b/src/widgets/settingspages/NotificationPage.cpp index e630c8d8f..4f4ea161b 100644 --- a/src/widgets/settingspages/NotificationPage.cpp +++ b/src/widgets/settingspages/NotificationPage.cpp @@ -29,9 +29,9 @@ NotificationPage::NotificationPage() { auto settings = tabs.appendTab(new QVBoxLayout, "Options"); { - settings.emplace("You can be informed when certain " - "channels go live. You can be " - "informed in multiple ways:"); + settings.emplace( + "You can be informed when certain channels go live. You " + "can be informed in multiple ways:"); settings.append(this->createCheckBox( "Flash taskbar", getSettings()->notificationFlashTaskbar));