aboutsummaryrefslogtreecommitdiffhomepage
path: root/client/src/app/+accounts
diff options
context:
space:
mode:
authorChocobozzz <me@florianbigard.com>2021-02-19 13:47:37 +0100
committerChocobozzz <me@florianbigard.com>2021-02-19 13:47:37 +0100
commit07f81d9deedf4921b8518c2d2b16043167b4c5d5 (patch)
treee333622a6686d637612a2f552aa0c64503163fe5 /client/src/app/+accounts
parent300cb723eb9bd219e6d381c57a8a6a860563bbbb (diff)
downloadPeerTube-07f81d9deedf4921b8518c2d2b16043167b4c5d5.tar.gz
PeerTube-07f81d9deedf4921b8518c2d2b16043167b4c5d5.tar.zst
PeerTube-07f81d9deedf4921b8518c2d2b16043167b4c5d5.zip
Fix NSFW policy on account/channel videos
Diffstat (limited to 'client/src/app/+accounts')
-rw-r--r--client/src/app/+accounts/account-search/account-search.component.ts19
-rw-r--r--client/src/app/+accounts/account-videos/account-videos.component.ts18
2 files changed, 20 insertions, 17 deletions
diff --git a/client/src/app/+accounts/account-search/account-search.component.ts b/client/src/app/+accounts/account-search/account-search.component.ts
index 378aa78c4..dda4bf0c7 100644
--- a/client/src/app/+accounts/account-search/account-search.component.ts
+++ b/client/src/app/+accounts/account-search/account-search.component.ts
@@ -1,4 +1,4 @@
1import { Subscription } from 'rxjs' 1import { forkJoin, Subscription } from 'rxjs'
2import { first, tap } from 'rxjs/operators' 2import { first, tap } from 'rxjs/operators'
3import { Component, ComponentFactoryResolver, OnDestroy, OnInit } from '@angular/core' 3import { Component, ComponentFactoryResolver, OnDestroy, OnInit } from '@angular/core'
4import { ActivatedRoute, Router } from '@angular/router' 4import { ActivatedRoute, Router } from '@angular/router'
@@ -16,6 +16,7 @@ import { VideoFilter } from '@shared/models'
16export class AccountSearchComponent extends AbstractVideoList implements OnInit, OnDestroy { 16export class AccountSearchComponent extends AbstractVideoList implements OnInit, OnDestroy {
17 titlePage: string 17 titlePage: string
18 loadOnInit = false 18 loadOnInit = false
19 loadUserVideoPreferences = true
19 20
20 search = '' 21 search = ''
21 filter: VideoFilter = null 22 filter: VideoFilter = null
@@ -46,14 +47,14 @@ export class AccountSearchComponent extends AbstractVideoList implements OnInit,
46 this.enableAllFilterIfPossible() 47 this.enableAllFilterIfPossible()
47 48
48 // Parent get the account for us 49 // Parent get the account for us
49 this.accountSub = this.accountService.accountLoaded 50 this.accountSub = forkJoin([
50 .pipe(first()) 51 this.accountService.accountLoaded.pipe(first()),
51 .subscribe(account => { 52 this.onUserLoadedSubject.pipe(first())
52 this.account = account 53 ]).subscribe(([ account ]) => {
53 54 this.account = account
54 this.reloadVideos() 55
55 this.generateSyndicationList() 56 this.reloadVideos()
56 }) 57 })
57 } 58 }
58 59
59 ngOnDestroy () { 60 ngOnDestroy () {
diff --git a/client/src/app/+accounts/account-videos/account-videos.component.ts b/client/src/app/+accounts/account-videos/account-videos.component.ts
index da3903d2c..484d60e25 100644
--- a/client/src/app/+accounts/account-videos/account-videos.component.ts
+++ b/client/src/app/+accounts/account-videos/account-videos.component.ts
@@ -1,4 +1,4 @@
1import { Subscription } from 'rxjs' 1import { forkJoin, Subscription } from 'rxjs'
2import { first, tap } from 'rxjs/operators' 2import { first, tap } from 'rxjs/operators'
3import { Component, ComponentFactoryResolver, OnDestroy, OnInit } from '@angular/core' 3import { Component, ComponentFactoryResolver, OnDestroy, OnInit } from '@angular/core'
4import { ActivatedRoute, Router } from '@angular/router' 4import { ActivatedRoute, Router } from '@angular/router'
@@ -18,6 +18,7 @@ import { VideoFilter } from '@shared/models'
18export class AccountVideosComponent extends AbstractVideoList implements OnInit, OnDestroy { 18export class AccountVideosComponent extends AbstractVideoList implements OnInit, OnDestroy {
19 titlePage: string 19 titlePage: string
20 loadOnInit = false 20 loadOnInit = false
21 loadUserVideoPreferences = true
21 22
22 filter: VideoFilter = null 23 filter: VideoFilter = null
23 24
@@ -47,14 +48,15 @@ export class AccountVideosComponent extends AbstractVideoList implements OnInit,
47 this.enableAllFilterIfPossible() 48 this.enableAllFilterIfPossible()
48 49
49 // Parent get the account for us 50 // Parent get the account for us
50 this.accountSub = this.accountService.accountLoaded 51 this.accountSub = forkJoin([
51 .pipe(first()) 52 this.accountService.accountLoaded.pipe(first()),
52 .subscribe(account => { 53 this.onUserLoadedSubject.pipe(first())
53 this.account = account 54 ]).subscribe(([ account ]) => {
55 this.account = account
54 56
55 this.reloadVideos() 57 this.reloadVideos()
56 this.generateSyndicationList() 58 this.generateSyndicationList()
57 }) 59 })
58 } 60 }
59 61
60 ngOnDestroy () { 62 ngOnDestroy () {