simplify infinate scroller

This commit is contained in:
MathMan05 2024-09-08 14:29:22 -05:00
parent c2c0e08b03
commit 3e92f2a9e6
5 changed files with 54 additions and 80 deletions

View file

@ -295,8 +295,8 @@ class Message extends SnowFlake {
next.generateMessage();
next = this.channel.messages.get(this.channel.idToNext.get(next.id));
}
if (this.channel.infinite.scroll && scroll) {
this.channel.infinite.scroll.scrollTop = scroll;
if (this.channel.infinite.div && scroll) {
this.channel.infinite.div.scrollTop = scroll;
}
};
}
@ -329,9 +329,9 @@ class Message extends SnowFlake {
next = this.channel.messages.get(this.channel.idToNext.get(next.id));
console.log("loopy");
}
if (this.channel.infinite.scroll && scroll) {
if (this.channel.infinite.div && scroll) {
func();
this.channel.infinite.scroll.scrollTop = scroll;
this.channel.infinite.div.scrollTop = scroll;
}
};
div.appendChild(build);