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:
parent
c0391145e5
commit
141d757a01
1 changed files with 0 additions and 8 deletions
|
@ -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)) {
|
||||
|
|
Loading…
Reference in a new issue