]> git.immae.eu Git - github/Chocobozzz/PeerTube.git/blobdiff - client/src/app/shared/video/video-miniature.component.ts
Fix videos list user NSFW policy
[github/Chocobozzz/PeerTube.git] / client / src / app / shared / video / video-miniature.component.ts
index 27098f4b4a0c097c5987572328d7b8dab1e5d7bb..7e8692b0be9f93b4bcb819ba431998e8a822cede 100644 (file)
@@ -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 () {