From 0a57bbff2141de718aa901bfbdd147468fd624c6 Mon Sep 17 00:00:00 2001
From: Chocobozzz <me@florianbigard.com>
Date: Mon, 8 Apr 2019 09:30:07 +0200
Subject: [PATCH] Handle actions in other videos section

---
 client/src/app/videos/+video-watch/video-watch.component.ts    | 1 -
 .../videos/recommendations/recommended-videos.component.html   | 2 +-
 .../app/videos/recommendations/recommended-videos.component.ts | 3 +++
 3 files changed, 4 insertions(+), 2 deletions(-)

diff --git a/client/src/app/videos/+video-watch/video-watch.component.ts b/client/src/app/videos/+video-watch/video-watch.component.ts
index 53673d9d9..edc546b28 100644
--- a/client/src/app/videos/+video-watch/video-watch.component.ts
+++ b/client/src/app/videos/+video-watch/video-watch.component.ts
@@ -29,7 +29,6 @@ import { VideoPlaylist } from '@app/shared/video-playlist/video-playlist.model'
 import { VideoPlaylistService } from '@app/shared/video-playlist/video-playlist.service'
 import { ComponentPagination } from '@app/shared/rest/component-pagination.model'
 import { Video } from '@app/shared/video/video.model'
-import { VideoActionsDisplayType } from '@app/shared/video/video-actions-dropdown.component'
 
 @Component({
   selector: 'my-video-watch',
diff --git a/client/src/app/videos/recommendations/recommended-videos.component.html b/client/src/app/videos/recommendations/recommended-videos.component.html
index 73f9f0fe1..1fb89f8b0 100644
--- a/client/src/app/videos/recommendations/recommended-videos.component.html
+++ b/client/src/app/videos/recommendations/recommended-videos.component.html
@@ -4,6 +4,6 @@
     </div>
 
     <div *ngFor="let video of (videos$ | async)">
-        <my-video-miniature [video]="video" [user]="user"></my-video-miniature>
+        <my-video-miniature [video]="video" [user]="user" (videoBlacklisted)="onVideoRemoved()" (videoRemoved)="onVideoRemoved()"></my-video-miniature>
     </div>
 </div>
diff --git a/client/src/app/videos/recommendations/recommended-videos.component.ts b/client/src/app/videos/recommendations/recommended-videos.component.ts
index c6c1d9e5d..68fd750cc 100644
--- a/client/src/app/videos/recommendations/recommended-videos.component.ts
+++ b/client/src/app/videos/recommendations/recommended-videos.component.ts
@@ -29,4 +29,7 @@ export class RecommendedVideosComponent implements OnChanges {
     }
   }
 
+  onVideoRemoved () {
+    this.store.requestNewRecommendations(this.inputRecommendation)
+  }
 }