diff --git a/src/components/structures/RoomView.js b/src/components/structures/RoomView.js index 34c711ee6f..23d5b2f127 100644 --- a/src/components/structures/RoomView.js +++ b/src/components/structures/RoomView.js @@ -144,6 +144,7 @@ module.exports = React.createClass({ // the end of the live timeline. It has the effect of hiding the // 'scroll to bottom' knob, among a couple of other things. atEndOfLiveTimeline: true, + atEndOfLiveTimelineInit: false, // used by componentDidUpdate to avoid unnecessary checks showTopUnreadMessagesBar: false, @@ -428,6 +429,12 @@ module.exports = React.createClass({ roomView.addEventListener('dragend', this.onDragLeaveOrEnd); } } + if (this.refs.messagePanel && !this.state.atEndOfLiveTimelineInit) { + this.setState({ + atEndOfLiveTimelineInit: true, + atEndOfLiveTimeline: this.refs.messagePanel.isAtEndOfLiveTimeline(), + }); + } }, componentWillUnmount: function() {