Improve room list performance when receiving messages
In summary this makes RoomTiles (and RoomAvatars) do more for themselves in terms of reacting individually to state changes in the js-sdk. Instead of force updating the entire room list for avatar changes and room name changes, do this in the RoomTile and RoomAvatar instead. This increases the number of listeners listening to the matrix client, but allows us to properly implement a shouldComponentUpdate for RoomTile (because the avatar, name and notification count are now in component state)
This commit is contained in:
parent
59bb5ce9d8
commit
8672b97f9a
4 changed files with 75 additions and 22 deletions
|
@ -624,6 +624,7 @@ var TimelinePanel = React.createClass({
|
|||
this.props.timelineSet.room.setUnreadNotificationCount('highlight', 0);
|
||||
dis.dispatch({
|
||||
action: 'on_room_read',
|
||||
roomId: this.props.timelineSet.room.roomId,
|
||||
});
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue