From 7ba3886794559ef9a1ece04d3dd2f7aa88bd4d2f Mon Sep 17 00:00:00 2001 From: Misieq01 <38589417+Misieq01@users.noreply.github.com> Date: Mon, 28 Oct 2024 11:32:26 +0100 Subject: [PATCH] Update src-tauri/src/notification_manager.rs Co-authored-by: Brian Pearce --- src-tauri/src/notification_manager.rs | 14 ++++++++------ 1 file changed, 8 insertions(+), 6 deletions(-) diff --git a/src-tauri/src/notification_manager.rs b/src-tauri/src/notification_manager.rs index c809be0cb..f12595e2b 100644 --- a/src-tauri/src/notification_manager.rs +++ b/src-tauri/src/notification_manager.rs @@ -22,12 +22,14 @@ 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 => {