You've already forked matrix-react-sdk
mirror of
https://github.com/matrix-org/matrix-react-sdk.git
synced 2025-07-30 02:21:17 +03:00
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:
@ -169,14 +169,6 @@ module.exports = React.createClass({
|
|||||||
if (this.state.joining) return;
|
if (this.state.joining) return;
|
||||||
if (room.roomId != this.props.roomId) 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;
|
var currentUnread = this.state.numUnreadMessages;
|
||||||
if (!toStartOfTimeline &&
|
if (!toStartOfTimeline &&
|
||||||
(ev.getSender() !== MatrixClientPeg.get().credentials.userId)) {
|
(ev.getSender() !== MatrixClientPeg.get().credentials.userId)) {
|
||||||
|
Reference in New Issue
Block a user