From ad569f9fa604ce5f20fe42df152c0027d1518477 Mon Sep 17 00:00:00 2001 From: Misieq01 Date: Thu, 12 Dec 2024 14:14:46 +0100 Subject: [PATCH] adjust linux code --- src-tauri/src/notification_manager.rs | 15 +++++++++------ 1 file changed, 9 insertions(+), 6 deletions(-) diff --git a/src-tauri/src/notification_manager.rs b/src-tauri/src/notification_manager.rs index f26dcd47b..dad3f2d7b 100644 --- a/src-tauri/src/notification_manager.rs +++ b/src-tauri/src/notification_manager.rs @@ -23,12 +23,15 @@ impl NotificationManager { match PlatformUtils::detect_current_os() { CurrentOperatingSystem::Linux => { #[cfg(target_os = "linux")] - let handle = notification.show().inspect_err( - |e| warn!(target: LOG_TARGET, "Failed to show notification: {:?}", e), - )?; - handle.on_close(|notification| { - info!(target: LOG_TARGET, "Notification closed: {:?}", notification); - }); + { + let handle = notification.show().inspect_err( + |e| warn!(target: LOG_TARGET, "Failed to show notification: {:?}", e), + )?; + handle.on_close(|notification| { + info!(target: LOG_TARGET, "Notification closed: {:?}", notification); + }); + } + Ok(()) } CurrentOperatingSystem::MacOS => {