X-Git-Url: https://git.immae.eu/?a=blobdiff_plain;f=client%2Fsrc%2Fapp%2Fvideos%2Frecommendations%2Frecommended-videos.component.ts;h=7e0fb88567ad442b14d44d42726ac5cf8943c221;hb=2f6b5e2d6ebcac88d9005ea2654ffa77907d5db2;hp=68fd750ccb9f64786e74fa993fde45c2947dd34f;hpb=0a57bbff2141de718aa901bfbdd147468fd624c6;p=github%2FChocobozzz%2FPeerTube.git diff --git a/client/src/app/videos/recommendations/recommended-videos.component.ts b/client/src/app/videos/recommendations/recommended-videos.component.ts index 68fd750cc..7e0fb8856 100644 --- a/client/src/app/videos/recommendations/recommended-videos.component.ts +++ b/client/src/app/videos/recommendations/recommended-videos.component.ts @@ -1,4 +1,4 @@ -import { Component, Input, OnChanges } from '@angular/core' +import { Component, Input, Output, OnChanges, EventEmitter } from '@angular/core' import { Observable } from 'rxjs' import { Video } from '@app/shared/video/video.model' import { RecommendationInfo } from '@app/shared/video/recommendation-info.model' @@ -12,6 +12,7 @@ import { User } from '@app/shared' export class RecommendedVideosComponent implements OnChanges { @Input() inputRecommendation: RecommendationInfo @Input() user: User + @Output() gotRecommendations = new EventEmitter() readonly hasVideos$: Observable readonly videos$: Observable @@ -21,6 +22,7 @@ export class RecommendedVideosComponent implements OnChanges { ) { this.videos$ = this.store.recommendations$ this.hasVideos$ = this.store.hasRecommendations$ + this.videos$.subscribe(videos => this.gotRecommendations.emit(videos)) } public ngOnChanges (): void {