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:
Alexander Skvortsov 2020-11-29 18:33:29 -05:00
parent 4a165a13c2
commit e3acc0a9e3

View File

@ -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();
} }