mirror of
https://github.com/suitenumerique/meet.git
synced 2026-07-26 11:58:53 +00:00
⚡️(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:
@@ -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)
|
||||
|
||||
Reference in New Issue
Block a user