forked from mystiq/hydrogen-web
don't override newly requested ranges when retrying loadattop
This commit is contained in:
parent
9411e6f065
commit
5c40b75eab
1 changed files with 5 additions and 1 deletions
|
@ -50,6 +50,8 @@ export class TimelineViewModel extends ViewModel {
|
|||
|
||||
/** if this.tiles is empty, call this with undefined for both startTile and endTile */
|
||||
setVisibleTileRange(startTile, endTile) {
|
||||
// don't clear these once done as they are used to check
|
||||
// for more tiles once loadAtTop finishes
|
||||
this._requestedStartTile = startTile;
|
||||
this._requestedEndTile = endTile;
|
||||
if (!this._requestScheduled) {
|
||||
|
@ -85,7 +87,9 @@ export class TimelineViewModel extends ViewModel {
|
|||
this._topLoadingPromise = null;
|
||||
if (!hasReachedEnd) {
|
||||
// check if more items need to be loaded by recursing
|
||||
this.setVisibleTileRange(this._startTile, this._endTile);
|
||||
// use the requested start / end tile,
|
||||
// so we don't end up overwriting a newly requested visible range here
|
||||
this.setVisibleTileRange(this._requestedStartTile, this._requestedEndTile);
|
||||
}
|
||||
});
|
||||
} else if (loadTop) {
|
||||
|
|
Loading…
Reference in a new issue