~cytrogen/masto-fe

967bd543bb7988db6b9585d8c7da7ff3ea62f720 — Claire 2 years ago 53f5b27
[Glitch] Fix auto-loading-more when not scrolled

Port 2b98e2ecd6224ad41d38f5febd31efa7e4de316d to glitch-soc

Signed-off-by: Claire <claire.github-309c@sitedethib.com>
1 files changed, 1 insertions(+), 1 deletions(-)

M app/javascript/flavours/glitch/components/scrollable_list.jsx
M app/javascript/flavours/glitch/components/scrollable_list.jsx => app/javascript/flavours/glitch/components/scrollable_list.jsx +1 -1
@@ 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();
      }