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.

This commit is contained in:
David Baker 2015-12-04 12:00:55 +00:00
parent c0391145e5
commit 141d757a01

View file

@ -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)) {