From 29b3b237d56c009ba5f6dfc0eacd81567a442961 Mon Sep 17 00:00:00 2001 From: David Baker Date: Fri, 4 Dec 2015 14:24:02 +0000 Subject: [PATCH] Refresh room list on timeline event even if it doesn't change highlight status since we still want to update the ordering. Fixes #413. --- src/components/views/rooms/RoomList.js | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/src/components/views/rooms/RoomList.js b/src/components/views/rooms/RoomList.js index db5195d3c0..8610793c40 100644 --- a/src/components/views/rooms/RoomList.js +++ b/src/components/views/rooms/RoomList.js @@ -109,17 +109,18 @@ module.exports = React.createClass({ } } + var newState = this.getRoomLists(); if (hl > 0) { - var newState = this.getRoomLists(); - // obviously this won't deep copy but this shouldn't be necessary var amap = this.state.activityMap; amap[room.roomId] = Math.max(amap[room.roomId] || 0, hl); newState.activityMap = amap; - this.setState(newState); } + // still want to update the list even if the highlight status + // hasn't changed because the ordering may have + this.setState(newState); }, onRoomName: function(room) { @@ -300,4 +301,4 @@ module.exports = React.createClass({ ); } -}); \ No newline at end of file +});