From 9d45db2919862640ad550c5326fb21ddc08d6d59 Mon Sep 17 00:00:00 2001 From: Rigel Kent Date: Sun, 29 Dec 2019 02:10:17 +0100 Subject: Fix my-account{videos,video-playlists} loading mecanism --- client/src/app/shared/video/abstract-video-list.ts | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'client/src/app/shared') diff --git a/client/src/app/shared/video/abstract-video-list.ts b/client/src/app/shared/video/abstract-video-list.ts index 746359851..3e3583a70 100644 --- a/client/src/app/shared/video/abstract-video-list.ts +++ b/client/src/app/shared/video/abstract-video-list.ts @@ -146,11 +146,11 @@ export abstract class AbstractVideoList implements OnInit, OnDestroy, DisableFor this.loadMoreVideos() } - loadMoreVideos () { + loadMoreVideos (reset = false) { this.getVideosObservable(this.pagination.currentPage).subscribe( ({ data, total }) => { this.pagination.totalItems = total - this.videos = [] + if (reset) this.videos = [] this.videos = this.videos.concat(data) if (this.groupByDate) this.buildGroupedDateLabels() @@ -171,7 +171,7 @@ export abstract class AbstractVideoList implements OnInit, OnDestroy, DisableFor reloadVideos () { this.pagination.currentPage = 1 - this.loadMoreVideos() + this.loadMoreVideos(true) } toggleModerationDisplay () { -- cgit v1.2.3