diff --git a/src/app/organisms/room/PeopleDrawer.jsx b/src/app/organisms/room/PeopleDrawer.jsx index 3e48b98d..85992f78 100644 --- a/src/app/organisms/room/PeopleDrawer.jsx +++ b/src/app/organisms/room/PeopleDrawer.jsx @@ -61,7 +61,6 @@ function PeopleDrawer({ roomId }) { const PER_PAGE_MEMBER = 50; const mx = initMatrix.matrixClient; const room = mx.getRoom(roomId); - let isRoomChanged = false; const [itemCount, setItemCount] = useState(PER_PAGE_MEMBER); const [membership, setMembership] = useState('join'); @@ -104,6 +103,7 @@ function PeopleDrawer({ roomId }) { useEffect(() => { let isGettingMembers = true; + let isRoomChanged = false; const updateMemberList = (event) => { if (isGettingMembers) return; if (event && event?.event?.room_id !== roomId) return; diff --git a/src/client/state/RoomTimeline.js b/src/client/state/RoomTimeline.js index b6a5c146..24e1b2e9 100644 --- a/src/client/state/RoomTimeline.js +++ b/src/client/state/RoomTimeline.js @@ -81,6 +81,8 @@ class RoomTimeline extends EventEmitter { this.ongoingDecryptionCount = 0; this.initialized = false; + setTimeout(() => this.room.loadMembersIfNeeded()); + // TODO: remove below line window.selectedRoom = this; }