Skip to content

Commit 3779fb5

Browse files
authored
refactor(notification): pull notify_rust from crates.io (#1432)
1 parent 0b00888 commit 3779fb5

23 files changed

+25
-3401
lines changed

.changes/crate-notify-rust.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
---
2+
"notification": patch
3+
---
4+
5+
Use notify_rust from crates.io instead of local fork.

Cargo.lock

Lines changed: 16 additions & 18 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

plugins/notification/Cargo.toml

Lines changed: 2 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -32,25 +32,13 @@ serde_repr = "0.1"
3232
win7-notifications = { version = "0.4.3", optional = true }
3333
windows-version = { version = "0.1", optional = true }
3434

35-
[target."cfg(all(unix, not(target_os = \"macos\")))".dependencies]
36-
lazy_static = { version = "1", optional = true }
37-
zbus = { version = "4", optional = true }
38-
log = "0.4"
39-
env_logger = { version = "0.10", optional = true }
40-
41-
[target."cfg(target_os=\"macos\")".dependencies]
42-
mac-notification-sys = "0.6"
43-
chrono = { version = "0.4", optional = true }
44-
45-
[target."cfg(target_os=\"windows\")".dependencies]
46-
winrt-notification = { package = "tauri-winrt-notification", version = "0.4.0" }
35+
[target."cfg(any(target_os = \"macos\", windows, target_os = \"linux\", target_os = \"dragonfly\", target_os = \"freebsd\", target_os = \"openbsd\", target_os = \"netbsd\"))".dependencies]
36+
notify-rust = "4.11"
4737

4838
[dev-dependencies]
4939
color-backtrace = "0.6"
5040
ctor = "0.2"
5141
maplit = "1"
5242

5343
[features]
54-
default = [ "zbus", "async" ]
55-
async = [ ]
5644
windows7-compat = [ "win7-notifications", "windows-version" ]

plugins/notification/src/desktop.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -160,7 +160,7 @@ mod imp {
160160
deprecated = "This function does not work on Windows 7. Use `Self::notify` instead."
161161
)]
162162
pub fn show(self) -> crate::Result<()> {
163-
let mut notification = crate::notify_rust::Notification::new();
163+
let mut notification = notify_rust::Notification::new();
164164
if let Some(body) = self.body {
165165
notification.body(&body);
166166
}
@@ -186,7 +186,7 @@ mod imp {
186186
}
187187
#[cfg(target_os = "macos")]
188188
{
189-
let _ = crate::notify_rust::set_application(if tauri::is_dev() {
189+
let _ = notify_rust::set_application(if tauri::is_dev() {
190190
"com.apple.Terminal"
191191
} else {
192192
&self.identifier

plugins/notification/src/lib.rs

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -32,9 +32,6 @@ mod commands;
3232
mod error;
3333
mod models;
3434

35-
#[allow(dead_code, unused_imports, deprecated, clippy::derivable_impls)]
36-
mod notify_rust;
37-
3835
pub use error::{Error, Result};
3936

4037
#[cfg(desktop)]

plugins/notification/src/notify_rust/error.rs

Lines changed: 0 additions & 161 deletions
This file was deleted.

0 commit comments

Comments
 (0)