From 722bca907b6aa69c3b617221870451ccf436921a Mon Sep 17 00:00:00 2001 From: Chocobozzz Date: Mon, 13 May 2019 10:37:55 +0200 Subject: Fix component reuse on channel/account videos --- .../+accounts/account-videos/account-videos.component.ts | 13 +++++++------ 1 file changed, 7 insertions(+), 6 deletions(-) (limited to 'client/src/app/+accounts') 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 1814ef455..0d579fa0c 100644 --- a/client/src/app/+accounts/account-videos/account-videos.component.ts +++ b/client/src/app/+accounts/account-videos/account-videos.component.ts @@ -7,7 +7,7 @@ import { AbstractVideoList } from '../../shared/video/abstract-video-list' import { VideoService } from '../../shared/video/video.service' import { Account } from '@app/shared/account/account.model' import { AccountService } from '@app/shared/account/account.service' -import { tap } from 'rxjs/operators' +import { first, tap } from 'rxjs/operators' import { I18n } from '@ngx-translate/i18n-polyfill' import { Subscription } from 'rxjs' import { ScreenService } from '@app/shared/misc/screen.service' @@ -50,12 +50,13 @@ export class AccountVideosComponent extends AbstractVideoList implements OnInit, // Parent get the account for us this.accountSub = this.accountService.accountLoaded - .subscribe(account => { - this.account = account + .pipe(first()) + .subscribe(account => { + this.account = account - this.reloadVideos() - this.generateSyndicationList() - }) + this.reloadVideos() + this.generateSyndicationList() + }) } ngOnDestroy () { -- cgit v1.2.3