aboutsummaryrefslogtreecommitdiffhomepage
path: root/client/src/app/shared/shared-video-miniature/abstract-video-list.ts
diff options
context:
space:
mode:
Diffstat (limited to 'client/src/app/shared/shared-video-miniature/abstract-video-list.ts')
-rw-r--r--client/src/app/shared/shared-video-miniature/abstract-video-list.ts33
1 files changed, 17 insertions, 16 deletions
diff --git a/client/src/app/shared/shared-video-miniature/abstract-video-list.ts b/client/src/app/shared/shared-video-miniature/abstract-video-list.ts
index 33061a837..d8b2ee17d 100644
--- a/client/src/app/shared/shared-video-miniature/abstract-video-list.ts
+++ b/client/src/app/shared/shared-video-miniature/abstract-video-list.ts
@@ -204,28 +204,29 @@ export abstract class AbstractVideoList implements OnInit, OnDestroy, AfterConte
204 } 204 }
205 205
206 loadMoreVideos (reset = false) { 206 loadMoreVideos (reset = false) {
207 this.getVideosObservable(this.pagination.currentPage).subscribe( 207 this.getVideosObservable(this.pagination.currentPage)
208 ({ data }) => { 208 .subscribe({
209 this.hasDoneFirstQuery = true 209 next: ({ data }) => {
210 this.lastQueryLength = data.length 210 this.hasDoneFirstQuery = true
211 this.lastQueryLength = data.length
211 212
212 if (reset) this.videos = [] 213 if (reset) this.videos = []
213 this.videos = this.videos.concat(data) 214 this.videos = this.videos.concat(data)
214 215
215 if (this.groupByDate) this.buildGroupedDateLabels() 216 if (this.groupByDate) this.buildGroupedDateLabels()
216 217
217 this.onMoreVideos() 218 this.onMoreVideos()
218 219
219 this.onDataSubject.next(data) 220 this.onDataSubject.next(data)
220 }, 221 },
221 222
222 error => { 223 error: err => {
223 const message = $localize`Cannot load more videos. Try again later.` 224 const message = $localize`Cannot load more videos. Try again later.`
224 225
225 console.error(message, { error }) 226 console.error(message, { err })
226 this.notifier.error(message) 227 this.notifier.error(message)
227 } 228 }
228 ) 229 })
229 } 230 }
230 231
231 reloadVideos () { 232 reloadVideos () {