Refresh room list on timeline event even if it doesn't change highlight status since we still want to update the ordering. Fixes #413.
This commit is contained in:
parent
6a67342d02
commit
29b3b237d5
1 changed files with 5 additions and 4 deletions
|
@ -109,17 +109,18 @@ module.exports = React.createClass({
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
var newState = this.getRoomLists();
|
||||||
if (hl > 0) {
|
if (hl > 0) {
|
||||||
var newState = this.getRoomLists();
|
|
||||||
|
|
||||||
// obviously this won't deep copy but this shouldn't be necessary
|
// obviously this won't deep copy but this shouldn't be necessary
|
||||||
var amap = this.state.activityMap;
|
var amap = this.state.activityMap;
|
||||||
amap[room.roomId] = Math.max(amap[room.roomId] || 0, hl);
|
amap[room.roomId] = Math.max(amap[room.roomId] || 0, hl);
|
||||||
|
|
||||||
newState.activityMap = amap;
|
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) {
|
onRoomName: function(room) {
|
||||||
|
@ -300,4 +301,4 @@ module.exports = React.createClass({
|
||||||
</GeminiScrollbar>
|
</GeminiScrollbar>
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue