Scroll infinite.
This commit is contained in:
		
							parent
							
								
									1a608d8cfb
								
							
						
					
					
						commit
						f0d76bd46a
					
				| @ -62,10 +62,10 @@ | ||||
|         let scrollTop = messagesContainer.scrollTop; | ||||
|         let scrollableHeight = messagesContainer.scrollHeight - messagesContainer.clientHeight; | ||||
| 
 | ||||
|         //if (scrollTop > scrollableHeight / 5) { | ||||
|         //    return false; | ||||
|         //} | ||||
|         return true; | ||||
|         if (scrollTop < scrollableHeight / 4) { | ||||
|             return true; | ||||
|         } | ||||
|         return false; | ||||
|     } | ||||
|     let isLoadingExtra = false; | ||||
|     async function loadExtra() { | ||||
| @ -81,7 +81,7 @@ | ||||
|         if(isLoadingExtra){ | ||||
|             return  | ||||
|         } | ||||
|         if(isScrolledPastHalf()){ | ||||
|         if(!isScrolledPastHalf()){ | ||||
|             return | ||||
|         } | ||||
|             isLoadingExtra = true | ||||
|  | ||||
		Loading…
	
		Reference in New Issue
	
	Block a user