1
0
mirror of https://github.com/AvengeMedia/DankMaterialShell.git synced 2026-08-02 03:28:28 -04:00

fix(notifications): handle sound-name hint

This commit is contained in:
bbedward
2026-07-09 12:00:15 -04:00
parent 8008238ca0
commit 0439d017b9
3 changed files with 59 additions and 5 deletions
+7 -3
View File
@@ -700,9 +700,13 @@ Singleton {
// Honor the freedesktop "suppress-sound" hint: the sender
// plays its own audio for this notification and asks the
// server not to double up.
const suppressSound = !!(notif.hints && notif.hints["suppress-sound"]);
if (SettingsData.soundsEnabled && SettingsData.soundNewNotification && !suppressSound) {
// server not to double up. "sound-name" is the opposite — an
// explicit request for audio — so it plays even when the
// global new-notification sound is off.
const soundHints = notif.hints || {};
const suppressSound = !!soundHints["suppress-sound"];
const requestsSound = !!soundHints["sound-name"];
if (SettingsData.soundsEnabled && (SettingsData.soundNewNotification || requestsSound) && !suppressSound) {
if (policy.urgency === NotificationUrgency.Critical) {
AudioService.playCriticalNotificationSound();
} else {