more fixes

This commit is contained in:
MathMan05 2024-11-28 13:09:41 -06:00
parent 7e82d783c7
commit f682267a1b

View file

@ -26,6 +26,13 @@ offset: number
this.scrollBottom=0; this.scrollBottom=0;
this.averageheight=60; this.averageheight=60;
this.watchtime=false; this.watchtime=false;
this.needsupdate=true;
this.beenloaded=false;
this.changePromise=undefined;
if(this.timeout){
clearTimeout(this.timeout);
this.timeout=null;
}
} }
constructor( constructor(
getIDFromOffset: InfiniteScroller["getIDFromOffset"], getIDFromOffset: InfiniteScroller["getIDFromOffset"],
@ -43,7 +50,7 @@ offset: number
if(this.div){ if(this.div){
throw new Error("Div already exists, exiting."); throw new Error("Div already exists, exiting.");
} }
this.resetVars();
const scroll = document.createElement("div"); const scroll = document.createElement("div");
scroll.classList.add("scroller"); scroll.classList.add("scroller");
this.div = scroll; this.div = scroll;