MOBILE-3881 timeline: Concatenate loaded more events

main
Pau Ferrer Ocaña 2022-04-22 13:53:57 +02:00
parent f0c544df03
commit 7eff952b6b
2 changed files with 2 additions and 1 deletions

View File

@ -76,6 +76,7 @@ export class AddonBlockTimelineEventsComponent implements OnChanges {
events: eventsByDay[dayTimestamp],
};
});
this.loadingMore = false;
} else {
this.empty = true;
}

View File

@ -164,7 +164,7 @@ export class AddonBlockTimelineComponent extends CoreBlockBaseComponent implemen
protected async fetchMyOverviewTimeline(afterEventId?: number): Promise<void> {
const events = await AddonBlockTimeline.getActionEventsByTimesort(afterEventId, this.searchText);
this.timeline.events = events.events;
this.timeline.events = afterEventId ? this.timeline.events.concat(events.events) : events.events;
this.timeline.canLoadMore = events.canLoadMore;
}