浏览代码

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

Didrik Nordström 3 年之前
父节点
当前提交
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)]
     {