From 07f81d9deedf4921b8518c2d2b16043167b4c5d5 Mon Sep 17 00:00:00 2001 From: Chocobozzz Date: Fri, 19 Feb 2021 13:47:37 +0100 Subject: Fix NSFW policy on account/channel videos --- .../video-channel-videos.component.ts | 20 +++++++++++--------- 1 file changed, 11 insertions(+), 9 deletions(-) (limited to 'client/src/app/+video-channels/video-channel-videos') diff --git a/client/src/app/+video-channels/video-channel-videos/video-channel-videos.component.ts b/client/src/app/+video-channels/video-channel-videos/video-channel-videos.component.ts index a49fd0d5d..803651505 100644 --- a/client/src/app/+video-channels/video-channel-videos/video-channel-videos.component.ts +++ b/client/src/app/+video-channels/video-channel-videos/video-channel-videos.component.ts @@ -1,4 +1,4 @@ -import { Subscription } from 'rxjs' +import { forkJoin, Subscription } from 'rxjs' import { first, tap } from 'rxjs/operators' import { Component, ComponentFactoryResolver, OnDestroy, OnInit } from '@angular/core' import { ActivatedRoute, Router } from '@angular/router' @@ -18,6 +18,7 @@ import { VideoFilter } from '@shared/models' export class VideoChannelVideosComponent extends AbstractVideoList implements OnInit, OnDestroy { titlePage: string loadOnInit = false + loadUserVideoPreferences = true filter: VideoFilter = null @@ -53,14 +54,15 @@ export class VideoChannelVideosComponent extends AbstractVideoList implements On this.enableAllFilterIfPossible() // Parent get the video channel for us - this.videoChannelSub = this.videoChannelService.videoChannelLoaded - .pipe(first()) - .subscribe(videoChannel => { - this.videoChannel = videoChannel - - this.reloadVideos() - this.generateSyndicationList() - }) + this.videoChannelSub = forkJoin([ + this.videoChannelService.videoChannelLoaded.pipe(first()), + this.onUserLoadedSubject.pipe(first()) + ]).subscribe(([ videoChannel ]) => { + this.videoChannel = videoChannel + + this.reloadVideos() + this.generateSyndicationList() + }) } ngOnDestroy () { -- cgit v1.2.3