don't try to load more when end of timeline reached
This commit is contained in:
parent
fe4bb5db40
commit
98cc1e2715
1 changed files with 5 additions and 3 deletions
|
@ -83,10 +83,12 @@ export class TimelineViewModel extends ViewModel {
|
|||
}
|
||||
|
||||
if (loadTop && !this._topLoadingPromise) {
|
||||
this._topLoadingPromise = this._timeline.loadAtTop(10).then(() => {
|
||||
this._topLoadingPromise = this._timeline.loadAtTop(10).then(hasReachedEnd => {
|
||||
this._topLoadingPromise = null;
|
||||
if (!hasReachedEnd) {
|
||||
// check if more items need to be loaded by recursing
|
||||
this.setVisibleTileRange(this._startTile, this._endTile);
|
||||
}
|
||||
});
|
||||
} else if (loadTop) {
|
||||
console.log("loadTop is true but already loading");
|
||||
|
|
Reference in a new issue