Merge pull request #3270 from crazyserver/MOBILE-3881

MOBILE-3881 timeline: Concatenate loaded more events
main
Dani Palou 2022-04-22 14:20:27 +02:00 committed by GitHub
commit a5b1f4c17c
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 2 additions and 1 deletions

View File

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

View File

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