aboutsummaryrefslogtreecommitdiffhomepage
path: root/client/src/app/+video-channels/video-channel-videos
diff options
context:
space:
mode:
Diffstat (limited to 'client/src/app/+video-channels/video-channel-videos')
-rw-r--r--client/src/app/+video-channels/video-channel-videos/video-channel-videos.component.ts8
1 files changed, 6 insertions, 2 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 28c591039..2d3f66994 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
@@ -11,6 +11,7 @@ import { VideoChannelService } from '@app/shared/video-channel/video-channel.ser
11import { VideoChannel } from '@app/shared/video-channel/video-channel.model' 11import { VideoChannel } from '@app/shared/video-channel/video-channel.model'
12import { tap } from 'rxjs/operators' 12import { tap } from 'rxjs/operators'
13import { I18n } from '@ngx-translate/i18n-polyfill' 13import { I18n } from '@ngx-translate/i18n-polyfill'
14import { Subscription } from 'rxjs'
14 15
15@Component({ 16@Component({
16 selector: 'my-video-channel-videos', 17 selector: 'my-video-channel-videos',
@@ -27,6 +28,7 @@ export class VideoChannelVideosComponent extends AbstractVideoList implements On
27 loadOnInit = false 28 loadOnInit = false
28 29
29 private videoChannel: VideoChannel 30 private videoChannel: VideoChannel
31 private videoChannelSub: Subscription
30 32
31 constructor ( 33 constructor (
32 protected router: Router, 34 protected router: Router,
@@ -48,17 +50,19 @@ export class VideoChannelVideosComponent extends AbstractVideoList implements On
48 super.ngOnInit() 50 super.ngOnInit()
49 51
50 // Parent get the video channel for us 52 // Parent get the video channel for us
51 this.videoChannelService.videoChannelLoaded 53 this.videoChannelSub = this.videoChannelService.videoChannelLoaded
52 .subscribe(videoChannel => { 54 .subscribe(videoChannel => {
53 this.videoChannel = videoChannel 55 this.videoChannel = videoChannel
54 this.currentRoute = '/video-channel/' + this.videoChannel.uuid + '/videos' 56 this.currentRoute = '/video-channel/' + this.videoChannel.uuid + '/videos'
55 57
56 this.loadMoreVideos(this.pagination.currentPage) 58 this.reloadVideos()
57 this.generateSyndicationList() 59 this.generateSyndicationList()
58 }) 60 })
59 } 61 }
60 62
61 ngOnDestroy () { 63 ngOnDestroy () {
64 if (this.videoChannelSub) this.videoChannelSub.unsubscribe()
65
62 super.ngOnDestroy() 66 super.ngOnDestroy()
63 } 67 }
64 68