fix bugs from PR review

pull/21833/head
Matthew Hodgson 2017-04-19 17:59:06 +01:00
parent fb6252a16b
commit 9f99224a1f
1 changed files with 6 additions and 2 deletions

View File

@ -75,6 +75,12 @@ module.exports = React.createClass({
this.dispatcherRef = dis.register(this.onAction); this.dispatcherRef = dis.register(this.onAction);
// Initialise the stickyHeaders when the component is created // Initialise the stickyHeaders when the component is created
this._updateStickyHeaders(true); this._updateStickyHeaders(true);
if (this.props.selectedRoom) {
constantTimeDispatcher.dispatch(
"RoomTile.select", this.props.selectedRoom, { selected: true }
);
}
}, },
componentWillReceiveProps: function(nextProps) { componentWillReceiveProps: function(nextProps) {
@ -155,8 +161,6 @@ module.exports = React.createClass({
} }
// cancel any pending calls to the rate_limited_funcs // cancel any pending calls to the rate_limited_funcs
this._delayedRefreshRoomList.cancelPendingCall(); this._delayedRefreshRoomList.cancelPendingCall();
document.removeEventListener('keydown', this._onKeyDown);
}, },
onRoom: function(room) { onRoom: function(room) {