feat: add option to suppress live notifications on startup (#5388)

This commit is contained in:
nerix
2024-07-20 14:19:27 +02:00
committed by GitHub
parent 4a7a5b09ce
commit 0495fbca43
11 changed files with 398 additions and 225 deletions
@@ -42,6 +42,10 @@ NotificationPage::NotificationPage()
settings.append(this->createCheckBox(
"Play sound for any channel going live",
getSettings()->notificationOnAnyChannel));
settings.append(this->createCheckBox(
"Suppress live notifications on startup",
getSettings()->suppressInitialLiveNotification));
#ifdef Q_OS_WIN
settings.append(this->createCheckBox(
"Show notification", getSettings()->notificationToast));
@@ -111,10 +115,8 @@ NotificationPage::NotificationPage()
// We can safely ignore this signal connection since we own the view
std::ignore = view->addButtonPressed.connect([] {
getApp()
->getNotifications()
->channelMap[Platform::Twitch]
.append("channel");
getApp()->getNotifications()->addChannelNotification(
"channel", Platform::Twitch);
});
}
}