diff --git a/src/components/structures/MatrixChat.js b/src/components/structures/MatrixChat.js index 69b737cb7ef..3ac2f5bd50c 100644 --- a/src/components/structures/MatrixChat.js +++ b/src/components/structures/MatrixChat.js @@ -1065,10 +1065,10 @@ export default React.createClass({ // this if we are not scrolled up in the view. To find out, delegate to // the timeline panel. If the timeline panel doesn't exist, then we assume // it is safe to reset the timeline. - if (!self.refs.loggedInView) { + if (!self._loggedInView) { return true; } - return self.refs.loggedInView.canResetTimelineInRoom(roomId); + return self._loggedInView.canResetTimelineInRoom(roomId); }); cli.on('sync', function(state, prevState) { @@ -1487,6 +1487,10 @@ export default React.createClass({ return this.props.makeRegistrationUrl(params); }, + _collectLoggedInView: function(ref) { + this._loggedInView = ref; + }, + render: function() { // console.log(`Rendering MatrixChat with view ${this.state.view}`); @@ -1519,7 +1523,7 @@ export default React.createClass({ */ const LoggedInView = sdk.getComponent('structures.LoggedInView'); return ( -