From 059ea935b701596bc802d89df5f34bb2ffc1fd00 Mon Sep 17 00:00:00 2001 From: lebaudantoine Date: Tue, 14 Jul 2026 19:14:03 +0200 Subject: [PATCH] =?UTF-8?q?=E2=9A=A1=EF=B8=8F(frontend)=20narrow=20partici?= =?UTF-8?q?pant=20event=20subscriptions=20in=20admin=20panel?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Reduce the set of participant change events the admin side panel subscribes to, so it only re-renders on events that actually affect its display. --- .../rooms/livekit/hooks/usePublishSourcesManager.ts | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/src/frontend/src/features/rooms/livekit/hooks/usePublishSourcesManager.ts b/src/frontend/src/features/rooms/livekit/hooks/usePublishSourcesManager.ts index 6d2ee4d2..b9b26e85 100644 --- a/src/frontend/src/features/rooms/livekit/hooks/usePublishSourcesManager.ts +++ b/src/frontend/src/features/rooms/livekit/hooks/usePublishSourcesManager.ts @@ -1,4 +1,4 @@ -import { Track } from 'livekit-client' +import { RoomEvent, Track } from 'livekit-client' import { useCallback, useMemo } from 'react' import { queryClient } from '@/api/queryClient' import { keys } from '@/api/queryKeys' @@ -43,7 +43,9 @@ export const usePublishSourcesManager = () => { const roomId = data?.slug const { updateParticipantsPermissions } = useUpdateParticipantsPermissions() - const remoteParticipants = useRemoteParticipants() + const remoteParticipants = useRemoteParticipants({ + updateOnlyOn: [RoomEvent.ParticipantAttributesChanged], + }) const unprivilegedRemoteParticipants = remoteParticipants.filter( (participant) => !getParticipantIsRoomAdmin(participant)