mirror of
https://github.com/Psychotoxical/psysonic.git
synced 2026-07-21 23:05:46 +00:00
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:
@@ -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())
|
||||
|
||||
Reference in New Issue
Block a user