fix(tray): gate playback_state cfg for Windows and Linux only (#416)

playback_state is only used for the Windows tray tooltip icon and the Linux
now-playing menu row; compiling it on macOS triggered an unused_variables
warning in CI.
This commit is contained in:
cucadmuh
2026-05-02 00:03:19 +03:00
committed by GitHub
parent 3f225951e6
commit 267f732397
+1
View File
@@ -3690,6 +3690,7 @@ fn build_tray_icon(app: &tauri::AppHandle) -> tauri::Result<TrayIcon> {
if g.is_empty() { None } else { Some(g.clone()) }
})
.unwrap_or_else(|| "Psysonic".to_string());
#[cfg(any(target_os = "windows", target_os = "linux"))]
let playback_state = app
.try_state::<TrayPlaybackState>()
.map(|s| s.0.lock().unwrap().clone())