From 9cc9fbf924aad82929e3502d39f4a018d31c354e Mon Sep 17 00:00:00 2001 From: Bruno Windels Date: Fri, 7 Sep 2018 14:05:26 +0200 Subject: [PATCH 1/2] avoid memberlist refresh for events related to rooms other but the current --- src/components/views/rooms/MemberList.js | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/src/components/views/rooms/MemberList.js b/src/components/views/rooms/MemberList.js index d302bee832..6522dc2e2d 100644 --- a/src/components/views/rooms/MemberList.js +++ b/src/components/views/rooms/MemberList.js @@ -163,15 +163,22 @@ module.exports = React.createClass({ }, onRoomStateMember: function(ev, state, member) { + if (member.roomId !== this.props.roomId) { + return; + } this._updateList(); }, onRoomMemberName: function(ev, member) { + if (member.roomId !== this.props.roomId) { + return; + } this._updateList(); }, onRoomStateEvent: function(event, state) { - if (event.getType() === "m.room.third_party_invite") { + if (event.getRoomId() === this.props.roomId && + event.getType() === "m.room.third_party_invite") { this._updateList(); } }, From 101dad83aaeaec1a3a7456832d918abe63d8e60f Mon Sep 17 00:00:00 2001 From: Bruno Windels Date: Fri, 7 Sep 2018 14:16:26 +0200 Subject: [PATCH 2/2] same for right panel --- src/components/structures/RightPanel.js | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/components/structures/RightPanel.js b/src/components/structures/RightPanel.js index 47b3df65cb..86870718e8 100644 --- a/src/components/structures/RightPanel.js +++ b/src/components/structures/RightPanel.js @@ -186,6 +186,9 @@ module.exports = React.createClass({ }, onRoomStateMember: function(ev, state, member) { + if (member.roomId !== this.props.roomId) { + return; + } // redraw the badge on the membership list if (this.state.phase === this.Phase.RoomMemberList && member.roomId === this.props.roomId) { this._delayedUpdate();