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
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
6 changed files with 17 additions and 7 deletions

View file

@ -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)

View file

@ -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();
}

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",

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

View file

@ -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(

View file

@ -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));