mirror of
https://github.com/flarum/framework.git
synced 2024-11-29 21:11:55 +08:00
Fix goToIndex to visible end
In the PostStream, `this.visibleEnd` represents the index of the last post + 1, but `loadNearIndex` treated it as if it was the index of the last post. This means that executing `goToIndex` on the post stream's current `this.visiblePost` didn't load new posts, and as a result, the requested scrolling did not occur.
This commit is contained in:
parent
4a165a13c2
commit
e3acc0a9e3
|
@ -172,7 +172,7 @@ class PostStreamState {
|
||||||
* @return {Promise}
|
* @return {Promise}
|
||||||
*/
|
*/
|
||||||
loadNearIndex(index) {
|
loadNearIndex(index) {
|
||||||
if (index >= this.visibleStart && index <= this.visibleEnd) {
|
if (index >= this.visibleStart && index < this.visibleEnd) {
|
||||||
return Promise.resolve();
|
return Promise.resolve();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue
Block a user