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:
@@ -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 {
|
||||
|
||||
Reference in New Issue
Block a user