diff --git a/src/app/hooks/useTauriThumbbar.ts b/src/app/hooks/useTauriThumbbar.ts index 6ee6a2183..23abea140 100644 --- a/src/app/hooks/useTauriThumbbar.ts +++ b/src/app/hooks/useTauriThumbbar.ts @@ -10,7 +10,7 @@ type ThumbbarAction = { action: 'mute' | 'deafen' | 'end' }; * P5-44 — Taskbar thumbnail toolbar (call controls). While a call is active, * mirrors the mic/sound state onto the native `set_thumbbar` command (three * Mute / Deafen / End-Call buttons on the Windows taskbar thumbnail toolbar) and - * hides them when the call ends. Thumb-button clicks come back as the + * hides them when the call ends. The tray icon mirrors the same state. Thumb-button clicks come back as the * `thumbbar-action` event and drive the real call controls. No-op in the browser. */ export function useTauriThumbbar(): void { @@ -25,6 +25,9 @@ export function useTauriThumbbar(): void { useEffect(() => { invokeTauri('set_thumbbar', { active, muted, deafened }); + // [cinny-desktop #4] Same state onto the tray icon + tooltip, from the same + // effect so the tray and the thumbbar can never disagree. + invokeTauri('set_tray_call_state', { active, muted, deafened }); }, [active, muted, deafened]); useTauriEvent('thumbbar-action', ({ action }) => {