Просмотр исходного кода

fix: add a default icon to notifications on linux (#4283)

Didrik Nordström 3 лет назад
Родитель
Сommit
235e448def
2 измененных файлов с 7 добавлено и 0 удалено
  1. 5 0
      .changes/linux-notification-icon.md
  2. 2 0
      core/tauri/src/api/notification.rs

+ 5 - 0
.changes/linux-notification-icon.md

@@ -0,0 +1,5 @@
+---
+"tauri": patch
+---
+
+Set notification icon to app icon on Linux.

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

@@ -83,6 +83,8 @@ impl Notification {
     }
     if let Some(icon) = self.icon {
       notification.icon(&icon);
+    } else {
+      notification.auto_icon();
     }
     #[cfg(windows)]
     {