️(frontend) narrow participant event subscriptions in admin panel

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.
This commit is contained in:
lebaudantoine
2026-07-14 19:14:03 +02:00
parent 430e638f62
commit 059ea935b7
@@ -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)