1
0
mirror of https://github.com/AvengeMedia/DankMaterialShell.git synced 2026-08-05 21:18:30 -04:00

fix(notifications): handle sound-name hint

(cherry picked from commit 0439d017b9)
This commit is contained in:
bbedward
2026-07-09 12:00:15 -04:00
committed by purian23
parent bdfd565b72
commit 6d08b91004
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 {