mirror of
https://github.com/flarum/core.git
synced 2025-08-08 09:26:34 +02:00
Add redraws after posts have been loaded from the API
This commit is contained in:
committed by
Franz Liedke
parent
ba82969a58
commit
f8d1c7a317
@@ -204,7 +204,7 @@ class PostStreamState {
|
|||||||
|
|
||||||
this.visibleEnd = this.count();
|
this.visibleEnd = this.count();
|
||||||
|
|
||||||
return this.loadRange(this.visibleStart, this.visibleEnd).then(() => m.redraw());
|
return this.loadRange(this.visibleStart, this.visibleEnd);
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@@ -264,7 +264,6 @@ class PostStreamState {
|
|||||||
*/
|
*/
|
||||||
loadPage(start, end, backwards) {
|
loadPage(start, end, backwards) {
|
||||||
console.log('loadPage');
|
console.log('loadPage');
|
||||||
const redraw = () => {};
|
|
||||||
|
|
||||||
this.loadPageTimeouts[start] = setTimeout(
|
this.loadPageTimeouts[start] = setTimeout(
|
||||||
() => {
|
() => {
|
||||||
@@ -332,7 +331,8 @@ class PostStreamState {
|
|||||||
filter: { discussion: this.discussion.id() },
|
filter: { discussion: this.discussion.id() },
|
||||||
page: { near: number },
|
page: { near: number },
|
||||||
})
|
})
|
||||||
.then(this.show.bind(this));
|
.then(this.show.bind(this))
|
||||||
|
.then(() => m.redraw());
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@@ -354,7 +354,9 @@ class PostStreamState {
|
|||||||
|
|
||||||
this.reset(start, end);
|
this.reset(start, end);
|
||||||
|
|
||||||
return this.loadRange(start, end).then(this.show.bind(this));
|
return this.loadRange(start, end)
|
||||||
|
.then(this.show.bind(this))
|
||||||
|
.then(() => m.redraw());
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
Reference in New Issue
Block a user