Implement chathistory support

This commit is contained in:
Simon Ser
2020-06-29 09:06:47 +02:00
parent 8809fdcd6a
commit c9b07efc9c
4 changed files with 136 additions and 16 deletions

View File

@@ -40,10 +40,16 @@ export default class ScrollManager extends Component {
}
this.scroll(pos);
this.stickToBottom = pos.bottom;
if (this.props.target.current.scrollTop == 0) {
this.props.onScrollTop();
}
}
handleScroll() {
this.stickToBottom = this.isAtBottom();
if (this.props.target.current.scrollTop == 0) {
this.props.onScrollTop();
}
}
componentDidMount() {