+
+ private subscribeToVideoRequests () {
+ this.videoRequests
+ .pipe(concatMap(({ reset, obs }) => obs.pipe(map(({ data }) => ({ data, reset })))))
+ .subscribe({
+ next: ({ data, reset }) => {
+ this.hasDoneFirstQuery = true
+ this.lastQueryLength = data.length
+
+ if (reset) this.videos = []
+ this.videos = this.videos.concat(data)
+
+ if (this.groupByDate) this.buildGroupedDateLabels()
+
+ this.onDataSubject.next(data)
+ this.videosLoaded.emit(this.videos)
+ },
+
+ error: err => {
+ const message = $localize`Cannot load more videos. Try again later.`
+
+ logger.error(message, err)
+ this.notifier.error(message)
+ }
+ })
+ }