From 412d84ccb2cba68b04d32a9e1128d7da63d55296 Mon Sep 17 00:00:00 2001 From: Michael Telatynski <7t3chguy@gmail.com> Date: Wed, 9 Dec 2020 11:09:18 +0000 Subject: [PATCH] improve comments --- src/hooks/useRoomMembers.ts | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/hooks/useRoomMembers.ts b/src/hooks/useRoomMembers.ts index 71a3c46a86..e25436045e 100644 --- a/src/hooks/useRoomMembers.ts +++ b/src/hooks/useRoomMembers.ts @@ -21,7 +21,7 @@ import {RoomMember} from "matrix-js-sdk/src/models/room-member"; import {useEventEmitter} from "./useEventEmitter"; import {throttle} from "lodash"; -// Hook to simplify listening to Matrix Room members +// Hook to simplify watching Matrix Room joined members export const useRoomMembers = (room: Room, throttleWait = 250) => { const [members, setMembers] = useState(room.getJoinedMembers()); useEventEmitter(room.currentState, "RoomState.members", throttle(() => { @@ -30,6 +30,7 @@ export const useRoomMembers = (room: Room, throttleWait = 250) => { return members; }; +// Hook to simplify watching Matrix Room joined member count export const useRoomMemberCount = (room: Room, throttleWait = 250) => { const [count, setCount] = useState(room.getJoinedMemberCount()); useEventEmitter(room.currentState, "RoomState.members", throttle(() => {