fix: suppress unused variable warnings in tray icon theme

This commit is contained in:
t8y2 2026-06-25 21:38:27 +08:00
parent 2f8672cdef
commit 87938abb64
1 changed files with 5 additions and 5 deletions

View File

@ -163,19 +163,19 @@ fn apply_desktop_icon_theme(app: &tauri::AppHandle, icon_theme: DesktopIconTheme
Ok(())
}
fn apply_desktop_tray_icon_theme(app: &tauri::AppHandle, icon_theme: DesktopIconTheme) -> tauri::Result<()> {
if let Some(tray) = app.tray_by_id(DESKTOP_TRAY_ID) {
fn apply_desktop_tray_icon_theme(app: &tauri::AppHandle, _icon_theme: DesktopIconTheme) -> tauri::Result<()> {
if let Some(_tray) = app.tray_by_id(DESKTOP_TRAY_ID) {
#[cfg(target_os = "windows")]
{
let icon = match icon_theme {
let icon = match _icon_theme {
DesktopIconTheme::Default => app.default_window_icon().cloned(),
DesktopIconTheme::Black => Some(BLACK_APP_ICON),
};
tray.set_icon(icon)?;
_tray.set_icon(icon)?;
}
#[cfg(not(any(target_os = "macos", target_os = "windows")))]
{
let _ = (tray, icon_theme);
let _ = (_tray, _icon_theme);
}
}
Ok(())