diff options
author | Chocobozzz <me@florianbigard.com> | 2019-05-13 10:37:55 +0200 |
---|---|---|
committer | Chocobozzz <me@florianbigard.com> | 2019-05-13 10:37:55 +0200 |
commit | 722bca907b6aa69c3b617221870451ccf436921a (patch) | |
tree | 1da6b69816f690db274e378fe559dc3193050aae /client/src/app/+video-channels | |
parent | 19041ac885f98de5494476376b65d454c656b230 (diff) | |
download | PeerTube-722bca907b6aa69c3b617221870451ccf436921a.tar.gz PeerTube-722bca907b6aa69c3b617221870451ccf436921a.tar.zst PeerTube-722bca907b6aa69c3b617221870451ccf436921a.zip |
Fix component reuse on channel/account videos
Diffstat (limited to 'client/src/app/+video-channels')
-rw-r--r-- | client/src/app/+video-channels/video-channel-videos/video-channel-videos.component.ts | 13 |
1 files changed, 7 insertions, 6 deletions
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 2045a095d..5e60b34b4 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 | |||
@@ -7,7 +7,7 @@ import { AbstractVideoList } from '../../shared/video/abstract-video-list' | |||
7 | import { VideoService } from '../../shared/video/video.service' | 7 | import { VideoService } from '../../shared/video/video.service' |
8 | import { VideoChannelService } from '@app/shared/video-channel/video-channel.service' | 8 | import { VideoChannelService } from '@app/shared/video-channel/video-channel.service' |
9 | import { VideoChannel } from '@app/shared/video-channel/video-channel.model' | 9 | import { VideoChannel } from '@app/shared/video-channel/video-channel.model' |
10 | import { tap } from 'rxjs/operators' | 10 | import { first, tap } from 'rxjs/operators' |
11 | import { I18n } from '@ngx-translate/i18n-polyfill' | 11 | import { I18n } from '@ngx-translate/i18n-polyfill' |
12 | import { Subscription } from 'rxjs' | 12 | import { Subscription } from 'rxjs' |
13 | import { ScreenService } from '@app/shared/misc/screen.service' | 13 | import { ScreenService } from '@app/shared/misc/screen.service' |
@@ -50,12 +50,13 @@ export class VideoChannelVideosComponent extends AbstractVideoList implements On | |||
50 | 50 | ||
51 | // Parent get the video channel for us | 51 | // Parent get the video channel for us |
52 | this.videoChannelSub = this.videoChannelService.videoChannelLoaded | 52 | this.videoChannelSub = this.videoChannelService.videoChannelLoaded |
53 | .subscribe(videoChannel => { | 53 | .pipe(first()) |
54 | this.videoChannel = videoChannel | 54 | .subscribe(videoChannel => { |
55 | this.videoChannel = videoChannel | ||
55 | 56 | ||
56 | this.reloadVideos() | 57 | this.reloadVideos() |
57 | this.generateSyndicationList() | 58 | this.generateSyndicationList() |
58 | }) | 59 | }) |
59 | } | 60 | } |
60 | 61 | ||
61 | ngOnDestroy () { | 62 | ngOnDestroy () { |