From 43889b20a821dcffa4a4b293cc6d8919c9c56c43 Mon Sep 17 00:00:00 2001 From: Ahmad Farhat Date: Tue, 12 Mar 2024 16:14:54 -0400 Subject: [PATCH] Added an extra ui check if all join mod is enabled (#5750) --- .../components/rooms/room/room_settings/RoomSettingsRow.jsx | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/app/javascript/components/rooms/room/room_settings/RoomSettingsRow.jsx b/app/javascript/components/rooms/room/room_settings/RoomSettingsRow.jsx index cd22c775c6..afc9c653e6 100644 --- a/app/javascript/components/rooms/room/room_settings/RoomSettingsRow.jsx +++ b/app/javascript/components/rooms/room/room_settings/RoomSettingsRow.jsx @@ -22,13 +22,15 @@ export default function RoomSettingsRow({ }) { const updateAPI = useUpdateAPI(); const checkedValue = useMemo(() => { - if (value === 'true' || value === 'ASK_MODERATOR') { + if (disabled) { + return false; + } if (value === 'true' || value === 'ASK_MODERATOR') { return true; } if (value === 'false' || value === 'ALWAYS_ACCEPT') { return false; } return value; - }, [value]); + }, [value, disabled]); if (config === 'false') { return null;