From ec5c85fb8ada70af1eb4c06f7b9ba6b20657d812 Mon Sep 17 00:00:00 2001 From: aarkue Date: Fri, 3 Oct 2025 11:19:10 +0200 Subject: [PATCH] Cfg guard code to allow build on non-macOS platforms --- src-tauri/src/lib.rs | 14 ++++---------- 1 file changed, 4 insertions(+), 10 deletions(-) diff --git a/src-tauri/src/lib.rs b/src-tauri/src/lib.rs index eed023a..d967376 100644 --- a/src-tauri/src/lib.rs +++ b/src-tauri/src/lib.rs @@ -967,15 +967,9 @@ pub fn run() { } }); - let show_item = - MenuItem::with_id(app, "show", "Show Presto", true, None::<&str>)?; - let start_session_item = MenuItem::with_id( - app, - "start_session", - "Start Session", - false, - None::<&str>, - )?; + let show_item = MenuItem::with_id(app, "show", "Show Presto", true, None::<&str>)?; + let start_session_item = + MenuItem::with_id(app, "start_session", "Start Session", false, None::<&str>)?; let pause_item = MenuItem::with_id(app, "pause", "Pause", false, None::<&str>)?; let skip_item = MenuItem::with_id(app, "skip", "Skip Session", false, None::<&str>)?; @@ -1141,13 +1135,13 @@ pub fn run() { let _ = app_handle.track_event("app_exited", None); app_handle.flush_events_blocking(); } + #[cfg(target_os = "macos")] tauri::RunEvent::Reopen { .. } => { // When the user clicks on the dock icon, show the window if let Some(window) = app_handle.get_webview_window("main") { let _ = window.show(); let _ = window.set_focus(); // If the app was previously hidden from dock, restore it - #[cfg(target_os = "macos")] { let app_handle_clone = app_handle.clone(); tauri::async_runtime::spawn(async move {