Ver Fonte

fix: sound for notifications on windows (fix #6652) (#6680)

Lej77 há 2 anos atrás
pai
commit
65fd674f50

+ 5 - 0
.changes/core-windows-notification-sound.md

@@ -0,0 +1,5 @@
+---
+"tauri": "patch"
+---
+
+Play a sound when showing a notification on Windows.

+ 3 - 0
core/tauri/src/api/notification.rs

@@ -119,6 +119,9 @@ impl Notification {
       {
         notification.app_id(&self.identifier);
       }
+
+      // will be parsed as a `::winrt_notification::Sound`
+      notification.sound_name("Default");
     }
     #[cfg(target_os = "macos")]
     {