From 141d757a01c2804c57bdc78ac2e0385ea6db01af Mon Sep 17 00:00:00 2001 From: David Baker Date: Fri, 4 Dec 2015 12:00:55 +0000 Subject: [PATCH] Don't recalculate atBottom here - we do it in onScroll and it should only be necessary to do it once. Also remove the magic 150px leeway. --- src/components/structures/RoomView.js | 8 -------- 1 file changed, 8 deletions(-) diff --git a/src/components/structures/RoomView.js b/src/components/structures/RoomView.js index 538bf83d03..4320724334 100644 --- a/src/components/structures/RoomView.js +++ b/src/components/structures/RoomView.js @@ -169,14 +169,6 @@ module.exports = React.createClass({ if (this.state.joining) return; if (room.roomId != this.props.roomId) return; - var scrollNode = this._getScrollNode(); - if (scrollNode) { - this.atBottom = ( - scrollNode.scrollHeight - scrollNode.scrollTop <= - (scrollNode.clientHeight + 150) // 150? - ); - } - var currentUnread = this.state.numUnreadMessages; if (!toStartOfTimeline && (ev.getSender() !== MatrixClientPeg.get().credentials.userId)) {