fix(context-menu): update all checkbox call sites to reactive subscribe+getChecked
This commit is contained in:
@@ -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),
|
||||
});
|
||||
|
||||
|
||||
@@ -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),
|
||||
});
|
||||
|
||||
|
||||
Reference in New Issue
Block a user