-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'
export class AccountVideosComponent extends AbstractVideoList implements OnInit, OnDestroy {
titlePage: string
loadOnInit = false
+ loadUserVideoPreferences = true
filter: VideoFilter = null
this.enableAllFilterIfPossible()
// Parent get the account for us
- this.accountSub = this.accountService.accountLoaded
- .pipe(first())
- .subscribe(account => {
- this.account = account
+ this.accountSub = forkJoin([
+ this.accountService.accountLoaded.pipe(first()),
+ this.onUserLoadedSubject.pipe(first())
+ ]).subscribe(([ account ]) => {
+ this.account = account
- this.reloadVideos()
- this.generateSyndicationList()
- })
+ this.reloadVideos()
+ this.generateSyndicationList()
+ })
}
ngOnDestroy () {