From d1a63fc7ac58a1db00d8ca4f43aadba02eb9b084 Mon Sep 17 00:00:00 2001 From: Chocobozzz Date: Fri, 21 Sep 2018 14:08:14 +0200 Subject: Fix videos list user NSFW policy --- client/src/app/shared/video/video-miniature.component.ts | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'client/src/app') diff --git a/client/src/app/shared/video/video-miniature.component.ts b/client/src/app/shared/video/video-miniature.component.ts index 27098f4b4..7e8692b0b 100644 --- a/client/src/app/shared/video/video-miniature.component.ts +++ b/client/src/app/shared/video/video-miniature.component.ts @@ -16,12 +16,14 @@ export class VideoMiniatureComponent implements OnInit { @Input() video: Video @Input() ownerDisplayType: OwnerDisplayType = 'account' - isVideoBlur: boolean - private ownerDisplayTypeChosen: 'account' | 'videoChannel' constructor (private serverService: ServerService) { } + get isVideoBlur () { + return this.video.isVideoNSFWForUser(this.user, this.serverService.getConfig()) + } + ngOnInit () { if (this.ownerDisplayType === 'account' || this.ownerDisplayType === 'videoChannel') { this.ownerDisplayTypeChosen = this.ownerDisplayType @@ -38,8 +40,6 @@ export class VideoMiniatureComponent implements OnInit { } else { this.ownerDisplayTypeChosen = 'videoChannel' } - - this.isVideoBlur = this.video.isVideoNSFWForUser(this.user, this.serverService.getConfig()) } displayOwnerAccount () { -- cgit v1.2.3