simplify infinate scroller
This commit is contained in:
parent
c2c0e08b03
commit
3e92f2a9e6
5 changed files with 54 additions and 80 deletions
|
@ -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);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue