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