From 5c20a45518c3afc40c9494cad4a78def92e5e288 Mon Sep 17 00:00:00 2001 From: Chocobozzz Date: Tue, 16 Jun 2020 11:00:35 +0200 Subject: Fix anonymous nsfw policy --- .../account-video-channels.component.html | 2 +- .../account-video-channels.component.ts | 30 +++++++++++----------- 2 files changed, 16 insertions(+), 16 deletions(-) (limited to 'client/src/app/+accounts/account-video-channels') diff --git a/client/src/app/+accounts/account-video-channels/account-video-channels.component.html b/client/src/app/+accounts/account-video-channels/account-video-channels.component.html index 73bac5f1d..5dbb341d2 100644 --- a/client/src/app/+accounts/account-video-channels/account-video-channels.component.html +++ b/client/src/app/+accounts/account-video-channels/account-video-channels.component.html @@ -21,7 +21,7 @@ diff --git a/client/src/app/+accounts/account-video-channels/account-video-channels.component.ts b/client/src/app/+accounts/account-video-channels/account-video-channels.component.ts index 5572064c1..2e5c5aae2 100644 --- a/client/src/app/+accounts/account-video-channels/account-video-channels.component.ts +++ b/client/src/app/+accounts/account-video-channels/account-video-channels.component.ts @@ -1,17 +1,17 @@ +import { from, Subject, Subscription } from 'rxjs' +import { concatMap, map, switchMap, tap } from 'rxjs/operators' import { Component, OnDestroy, OnInit } from '@angular/core' -import { ActivatedRoute } from '@angular/router' +import { UserService } from '@app/shared' import { Account } from '@app/shared/account/account.model' import { AccountService } from '@app/shared/account/account.service' -import { VideoChannelService } from '@app/shared/video-channel/video-channel.service' -import { concatMap, map, switchMap, tap } from 'rxjs/operators' -import { from, Subject, Subscription } from 'rxjs' +import { ScreenService } from '@app/shared/misc/screen.service' +import { ComponentPagination, hasMoreItems } from '@app/shared/rest/component-pagination.model' import { VideoChannel } from '@app/shared/video-channel/video-channel.model' +import { VideoChannelService } from '@app/shared/video-channel/video-channel.service' +import { VideoSortField } from '@app/shared/video/sort-field.type' import { Video } from '@app/shared/video/video.model' -import { AuthService } from '@app/core' import { VideoService } from '@app/shared/video/video.service' -import { VideoSortField } from '@app/shared/video/sort-field.type' -import { ComponentPagination, hasMoreItems } from '@app/shared/rest/component-pagination.model' -import { ScreenService } from '@app/shared/misc/screen.service' +import { User } from '@shared/models' @Component({ selector: 'my-account-video-channels', @@ -38,21 +38,18 @@ export class AccountVideoChannelsComponent implements OnInit, OnDestroy { onChannelDataSubject = new Subject() + userMiniature: User + private accountSub: Subscription constructor ( - private route: ActivatedRoute, - private authService: AuthService, private accountService: AccountService, private videoChannelService: VideoChannelService, private videoService: VideoService, - private screenService: ScreenService + private screenService: ScreenService, + private userService: UserService ) { } - get user () { - return this.authService.getUser() - } - ngOnInit () { // Parent get the account for us this.accountSub = this.accountService.accountLoaded @@ -61,6 +58,9 @@ export class AccountVideoChannelsComponent implements OnInit, OnDestroy { this.loadMoreChannels() }) + + this.userService.getAnonymousOrLoggedUser() + .subscribe(user => this.userMiniature = user) } ngOnDestroy () { -- cgit v1.2.3