various fixes
This commit is contained in:
parent
302341bb99
commit
fa1db8cf5d
6 changed files with 65 additions and 6 deletions
|
@ -163,8 +163,8 @@ class InfiniteScroller{
|
|||
this.currrunning=true;
|
||||
}
|
||||
if(!this.div){this.currrunning=false;return}
|
||||
const out=await Promise.allSettled([this.watchForTop(),this.watchForBottom()])
|
||||
const changed=(out[0]||out[1]);
|
||||
const out=await Promise.allSettled([this.watchForTop(),this.watchForBottom()]) as {value:boolean}[];
|
||||
const changed=(out[0].value||out[1].value);
|
||||
if(null===this.timeout&&changed){
|
||||
this.timeout=setTimeout(this.updatestuff.bind(this),300);
|
||||
}
|
||||
|
@ -213,7 +213,7 @@ class InfiniteScroller{
|
|||
await this.destroyFromID(thing[1]);
|
||||
}
|
||||
this.HTMLElements=[];
|
||||
clearInterval(this.timeout);
|
||||
clearTimeout(this.timeout);
|
||||
if(this.div){
|
||||
this.div.remove();
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue