You've already forked matrix-react-sdk
mirror of
https://github.com/matrix-org/matrix-react-sdk.git
synced 2025-06-29 02:01:06 +03:00
Comment + 1
This commit is contained in:
@ -362,6 +362,7 @@ module.exports = React.createClass({
|
|||||||
if (this.refs.messagePanel) {
|
if (this.refs.messagePanel) {
|
||||||
var messageWrapperScroll = this._getScrollNode();
|
var messageWrapperScroll = this._getScrollNode();
|
||||||
var wasAtBottom = this.atBottom;
|
var wasAtBottom = this.atBottom;
|
||||||
|
// + 1 here to avoid fractional pixel rounding errors
|
||||||
this.atBottom = messageWrapperScroll.scrollHeight - messageWrapperScroll.scrollTop <= messageWrapperScroll.clientHeight + 1;
|
this.atBottom = messageWrapperScroll.scrollHeight - messageWrapperScroll.scrollTop <= messageWrapperScroll.clientHeight + 1;
|
||||||
if (this.atBottom && !wasAtBottom) {
|
if (this.atBottom && !wasAtBottom) {
|
||||||
this.forceUpdate(); // remove unread msg count
|
this.forceUpdate(); // remove unread msg count
|
||||||
|
Reference in New Issue
Block a user