From 0d91df166a71f98fc36c6e87b0790e47ff26a355 Mon Sep 17 00:00:00 2001 From: Jannis Braun <151788261+TheZwiss@users.noreply.github.com> Date: Tue, 24 Mar 2026 21:48:26 +0100 Subject: [PATCH] fix(context-menu): update all checkbox call sites to reactive subscribe+getChecked --- packages/web/src/components/layout/MobileSpacesScreen.tsx | 4 ++-- packages/web/src/components/layout/MobileVoiceFullScreen.tsx | 4 ++-- packages/web/src/components/voice/StreamTile.tsx | 4 ++-- packages/web/src/components/voice/VoiceChannel.tsx | 4 ++-- packages/web/src/components/voice/VoiceUser.tsx | 4 ++-- 5 files changed, 10 insertions(+), 10 deletions(-) diff --git a/packages/web/src/components/layout/MobileSpacesScreen.tsx b/packages/web/src/components/layout/MobileSpacesScreen.tsx index 2f9d4ee7..0233ba14 100644 --- a/packages/web/src/components/layout/MobileSpacesScreen.tsx +++ b/packages/web/src/components/layout/MobileSpacesScreen.tsx @@ -492,12 +492,12 @@ export function MobileSpacesScreen() { items.push({ key: 'mod-end-sep', type: 'separator' }); } - const isUserMuted = useVoiceStore.getState().participantMutes.get(userId) ?? false; items.push({ key: 'mute-user', type: 'checkbox', label: 'Mute User', - checked: isUserMuted, + subscribe: useVoiceStore.subscribe, + getChecked: () => useVoiceStore.getState().participantMutes.get(userId) ?? false, onChange: (checked) => useVoiceStore.getState().setParticipantMute(userId, checked), }); diff --git a/packages/web/src/components/layout/MobileVoiceFullScreen.tsx b/packages/web/src/components/layout/MobileVoiceFullScreen.tsx index 7c239316..6d3658ce 100644 --- a/packages/web/src/components/layout/MobileVoiceFullScreen.tsx +++ b/packages/web/src/components/layout/MobileVoiceFullScreen.tsx @@ -123,12 +123,12 @@ export function MobileVoiceFullScreen() { } // Local mute checkbox - const isUserMuted = useVoiceStore.getState().participantMutes.get(userId) ?? false; items.push({ key: 'mute-user', type: 'checkbox', label: 'Mute User', - checked: isUserMuted, + subscribe: useVoiceStore.subscribe, + getChecked: () => useVoiceStore.getState().participantMutes.get(userId) ?? false, onChange: (checked) => useVoiceStore.getState().setParticipantMute(userId, checked), }); diff --git a/packages/web/src/components/voice/StreamTile.tsx b/packages/web/src/components/voice/StreamTile.tsx index 5dec42fb..04776d67 100644 --- a/packages/web/src/components/voice/StreamTile.tsx +++ b/packages/web/src/components/voice/StreamTile.tsx @@ -286,12 +286,12 @@ export function StreamTile({ tile, large }: StreamTileProps) { items.push({ key: 'watch-sep', type: 'separator' }); // Mute Stream checkbox - const isStreamMuted = useVoiceStore.getState().streamMutes.get(userId) ?? false; items.push({ key: 'mute-stream', type: 'checkbox', label: 'Mute Stream', - checked: isStreamMuted, + subscribe: useVoiceStore.subscribe, + getChecked: () => useVoiceStore.getState().streamMutes.get(userId) ?? false, onChange: (checked) => useVoiceStore.getState().setStreamMute(userId, checked), }); diff --git a/packages/web/src/components/voice/VoiceChannel.tsx b/packages/web/src/components/voice/VoiceChannel.tsx index 21bab818..48951e1e 100644 --- a/packages/web/src/components/voice/VoiceChannel.tsx +++ b/packages/web/src/components/voice/VoiceChannel.tsx @@ -83,12 +83,12 @@ export function VoiceChannel({ channelId, channelName, onClick, locked, canManag } // Mute User checkbox - const isUserMuted = useVoiceStore.getState().participantMutes.get(userId) ?? false; items.push({ key: 'mute-user', type: 'checkbox', label: 'Mute User', - checked: isUserMuted, + subscribe: useVoiceStore.subscribe, + getChecked: () => useVoiceStore.getState().participantMutes.get(userId) ?? false, onChange: (checked) => useVoiceStore.getState().setParticipantMute(userId, checked), }); diff --git a/packages/web/src/components/voice/VoiceUser.tsx b/packages/web/src/components/voice/VoiceUser.tsx index fc01ba53..9267a40a 100644 --- a/packages/web/src/components/voice/VoiceUser.tsx +++ b/packages/web/src/components/voice/VoiceUser.tsx @@ -116,12 +116,12 @@ export function VoiceUser({ tile, large }: VoiceUserProps) { } // Mute User checkbox - const isUserMuted = useVoiceStore.getState().participantMutes.get(targetUserId) ?? false; items.push({ key: 'mute-user', type: 'checkbox', label: 'Mute User', - checked: isUserMuted, + subscribe: useVoiceStore.subscribe, + getChecked: () => useVoiceStore.getState().participantMutes.get(targetUserId) ?? false, onChange: (checked) => useVoiceStore.getState().setParticipantMute(targetUserId, checked), });