[Glitch] Fix auto-loading-more when not scrolled
Port 2b98e2ecd6
to glitch-soc
Signed-off-by: Claire <claire.github-309c@sitedethib.com>
This commit is contained in:
parent
53f5b27bd1
commit
967bd543bb
|
@ -78,7 +78,7 @@ class ScrollableList extends PureComponent {
|
|||
const clientHeight = this.getClientHeight();
|
||||
const offset = scrollHeight - scrollTop - clientHeight;
|
||||
|
||||
if (400 > offset && this.props.onLoadMore && this.props.hasMore && !this.props.isLoading) {
|
||||
if (scrollTop > 0 && offset < 400 && this.props.onLoadMore && this.props.hasMore && !this.props.isLoading) {
|
||||
this.props.onLoadMore();
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue