mirror of
https://github.com/tauri-apps/tauri.git
synced 2026-04-03 10:11:15 +02:00
committed by
GitHub
parent
2a5ba7fe77
commit
86d0aaa021
5
.changes/fix-notifications-on-windows.md
Normal file
5
.changes/fix-notifications-on-windows.md
Normal file
@@ -0,0 +1,5 @@
|
||||
---
|
||||
"tauri": patch
|
||||
---
|
||||
|
||||
Run the `notification.show()` method on a dedicated async task to prevent a panic on Windows.
|
||||
@@ -81,7 +81,11 @@ impl Notification {
|
||||
notification.app_id(&self.identifier);
|
||||
}
|
||||
}
|
||||
notification.show()?;
|
||||
|
||||
crate::async_runtime::spawn(async move {
|
||||
notification.show().expect("failed to show notification");
|
||||
});
|
||||
|
||||
Ok(())
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user