about summary refs log tree commit diff
path: root/app/javascript/flavours/glitch/components/scrollable_list.js
diff options
context:
space:
mode:
authorThibaut Girka <thib@sitedethib.com>2018-12-23 11:40:52 +0100
committerThibaut Girka <thib@sitedethib.com>2018-12-23 11:40:52 +0100
commit22dedb676be608d226e098bfdc11c48c8715fdfa (patch)
tree31d17a2ddc92756604158f8ea5f462ac7c34bef5 /app/javascript/flavours/glitch/components/scrollable_list.js
parent3e686beaea1931c76c778d8ca6b03c41caaf69db (diff)
[Glitch] Fix unnecessary loadMore calls when the end of a timeline has been reached
Port 8389b496ba9f8b5fa04a34ccc14c8e4195e03ea3 to glitch flavour
Diffstat (limited to 'app/javascript/flavours/glitch/components/scrollable_list.js')
-rw-r--r--app/javascript/flavours/glitch/components/scrollable_list.js2
1 files changed, 1 insertions, 1 deletions
diff --git a/app/javascript/flavours/glitch/components/scrollable_list.js b/app/javascript/flavours/glitch/components/scrollable_list.js
index bd922462e..21d717b81 100644
--- a/app/javascript/flavours/glitch/components/scrollable_list.js
+++ b/app/javascript/flavours/glitch/components/scrollable_list.js
@@ -47,7 +47,7 @@ export default class ScrollableList extends PureComponent {
       const { scrollTop, scrollHeight, clientHeight } = this.node;
       const offset = scrollHeight - scrollTop - clientHeight;
 
-      if (400 > offset && this.props.onLoadMore && !this.props.isLoading) {
+      if (400 > offset && this.props.onLoadMore && this.props.hasMore && !this.props.isLoading) {
         this.props.onLoadMore();
       }