aboutsummaryrefslogtreecommitdiffhomepage
path: root/client/src/app/+video-channels/video-channel-videos
diff options
context:
space:
mode:
authorChocobozzz <me@florianbigard.com>2018-06-07 11:19:26 +0200
committerChocobozzz <me@florianbigard.com>2018-06-07 11:19:26 +0200
commit734a5ceb3d04088743d72babcb9b05e6142043f6 (patch)
tree965bfbd0bf930cf4cc9568a5dc801c4e3909a1b4 /client/src/app/+video-channels/video-channel-videos
parentcc69c8db39f48b1053c246458541ccc406228711 (diff)
downloadPeerTube-734a5ceb3d04088743d72babcb9b05e6142043f6.tar.gz
PeerTube-734a5ceb3d04088743d72babcb9b05e6142043f6.tar.zst
PeerTube-734a5ceb3d04088743d72babcb9b05e6142043f6.zip
Fix account/channel pages route subscription
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