mirror of
https://github.com/Psychotoxical/psysonic.git
synced 2026-07-22 07:15:47 +00:00
refactor(ipc): complete tauri-specta typed-IPC cutover, contract guards, and layering cleanup (#1230)
This commit is contained in:
@@ -1,5 +1,5 @@
|
||||
import { useEffect } from 'react';
|
||||
import { invoke } from '@tauri-apps/api/core';
|
||||
import { toggleTrayIcon } from '@/lib/api/tray';
|
||||
import { useAuthStore } from '@/store/authStore';
|
||||
|
||||
/** Sync tray-icon visibility with the user's stored setting. Runs once on mount
|
||||
@@ -7,6 +7,6 @@ import { useAuthStore } from '@/store/authStore';
|
||||
export function useTrayIconSync() {
|
||||
const showTrayIcon = useAuthStore(s => s.showTrayIcon);
|
||||
useEffect(() => {
|
||||
invoke('toggle_tray_icon', { show: showTrayIcon }).catch(console.error);
|
||||
toggleTrayIcon({ show: showTrayIcon }).catch(console.error);
|
||||
}, [showTrayIcon]);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user