mirror of
https://github.com/vector-im/hydrogen-web.git
synced 2024-12-22 19:14:52 +01:00
don't try to load more when end of timeline reached
This commit is contained in:
parent
fe4bb5db40
commit
98cc1e2715
@ -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;
|
||||
// check if more items need to be loaded by recursing
|
||||
this.setVisibleTileRange(this._startTile, this._endTile);
|
||||
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");
|
||||
|
Loading…
Reference in New Issue
Block a user