[Glitch] Fix unnecessary loadMore calls when the end of a timeline has been reached
Port 8389b496ba9f8b5fa04a34ccc14c8e4195e03ea3 to glitch flavour
This commit is contained in:
		
							parent
							
								
									3e686beaea
								
							
						
					
					
						commit
						22dedb676b
					
				@ -47,7 +47,7 @@ export default class ScrollableList extends PureComponent {
 | 
				
			|||||||
      const { scrollTop, scrollHeight, clientHeight } = this.node;
 | 
					      const { scrollTop, scrollHeight, clientHeight } = this.node;
 | 
				
			||||||
      const offset = scrollHeight - scrollTop - clientHeight;
 | 
					      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();
 | 
					        this.props.onLoadMore();
 | 
				
			||||||
      }
 | 
					      }
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
				
			|||||||
		Loading…
	
	
			
			x
			
			
		
	
		Reference in New Issue
	
	Block a user