more checks for staying at bottom
This commit is contained in:
@@ -55,10 +55,16 @@ class InfiniteScroller{
|
||||
currrunning:boolean=false;
|
||||
async addedBottom(){
|
||||
this.updatestuff();
|
||||
const scrollBottom=this.scrollBottom;
|
||||
const func=this.snapBottom();
|
||||
await this.watchForChange();
|
||||
if(scrollBottom<30){
|
||||
this.scroll.scrollTop=this.scroll.scrollHeight;
|
||||
func();
|
||||
}
|
||||
snapBottom(){
|
||||
const scrollBottom=this.scrollBottom;
|
||||
return ()=>{
|
||||
if(scrollBottom<30){
|
||||
this.scroll.scrollTop=this.scroll.scrollHeight;
|
||||
}
|
||||
}
|
||||
}
|
||||
private async watchForTop():Promise<void>{
|
||||
|
Reference in New Issue
Block a user