From de3e143a8fd68bf1b9d6e1f01fd2808958375fae Mon Sep 17 00:00:00 2001 From: Bruno Windels Date: Thu, 12 Jul 2018 19:38:08 +0200 Subject: [PATCH] only lazy load the members when viewing a joined room --- src/components/structures/RoomView.js | 3 +++ src/stores/RoomViewStore.js | 1 - 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/src/components/structures/RoomView.js b/src/components/structures/RoomView.js index 0325b3d9a6..2c322b269d 100644 --- a/src/components/structures/RoomView.js +++ b/src/components/structures/RoomView.js @@ -312,6 +312,9 @@ module.exports = React.createClass({ // Stop peeking because we have joined this room previously MatrixClientPeg.get().stopPeeking(); this.setState({isPeeking: false}); + + //viewing a previously joined room, try to lazy load members + MatrixClientPeg.get().loadRoomMembersIfNeeded(room.roomId); } } }, diff --git a/src/stores/RoomViewStore.js b/src/stores/RoomViewStore.js index 05ad16912c..fed0d7b4a1 100644 --- a/src/stores/RoomViewStore.js +++ b/src/stores/RoomViewStore.js @@ -133,7 +133,6 @@ class RoomViewStore extends Store { _viewRoom(payload) { if (payload.room_id) { - MatrixClientPeg.get().loadRoomMembersIfNeeded(payload.room_id); const newState = { roomId: payload.room_id, roomAlias: payload.room_alias,