aboutsummaryrefslogtreecommitdiffhomepage
path: root/client/src/app/videos/video-list/video-user-subscriptions.component.ts
diff options
context:
space:
mode:
authorChocobozzz <me@florianbigard.com>2019-07-22 15:40:13 +0200
committerChocobozzz <chocobozzz@cpy.re>2019-07-24 10:58:16 +0200
commit93cae47925e4dd68b7d34a41927b2740b4fab1b4 (patch)
treef649ab49fab1886b434e164591990cc99b234466 /client/src/app/videos/video-list/video-user-subscriptions.component.ts
parent587568e1cc0e33c023c1ac62dd28fef313285250 (diff)
downloadPeerTube-93cae47925e4dd68b7d34a41927b2740b4fab1b4.tar.gz
PeerTube-93cae47925e4dd68b7d34a41927b2740b4fab1b4.tar.zst
PeerTube-93cae47925e4dd68b7d34a41927b2740b4fab1b4.zip
Add client hooks
Diffstat (limited to 'client/src/app/videos/video-list/video-user-subscriptions.component.ts')
-rw-r--r--client/src/app/videos/video-list/video-user-subscriptions.component.ts16
1 files changed, 14 insertions, 2 deletions
diff --git a/client/src/app/videos/video-list/video-user-subscriptions.component.ts b/client/src/app/videos/video-list/video-user-subscriptions.component.ts
index 3caa371d8..ac325aeff 100644
--- a/client/src/app/videos/video-list/video-user-subscriptions.component.ts
+++ b/client/src/app/videos/video-list/video-user-subscriptions.component.ts
@@ -9,6 +9,7 @@ import { I18n } from '@ngx-translate/i18n-polyfill'
9import { ScreenService } from '@app/shared/misc/screen.service' 9import { ScreenService } from '@app/shared/misc/screen.service'
10import { OwnerDisplayType } from '@app/shared/video/video-miniature.component' 10import { OwnerDisplayType } from '@app/shared/video/video-miniature.component'
11import { Notifier, ServerService } from '@app/core' 11import { Notifier, ServerService } from '@app/core'
12import { HooksService } from '@app/core/plugins/hooks.service'
12 13
13@Component({ 14@Component({
14 selector: 'my-videos-user-subscriptions', 15 selector: 'my-videos-user-subscriptions',
@@ -29,7 +30,8 @@ export class VideoUserSubscriptionsComponent extends AbstractVideoList implement
29 protected notifier: Notifier, 30 protected notifier: Notifier,
30 protected authService: AuthService, 31 protected authService: AuthService,
31 protected screenService: ScreenService, 32 protected screenService: ScreenService,
32 private videoService: VideoService 33 private videoService: VideoService,
34 private hooks: HooksService
33 ) { 35 ) {
34 super() 36 super()
35 37
@@ -46,8 +48,18 @@ export class VideoUserSubscriptionsComponent extends AbstractVideoList implement
46 48
47 getVideosObservable (page: number) { 49 getVideosObservable (page: number) {
48 const newPagination = immutableAssign(this.pagination, { currentPage: page }) 50 const newPagination = immutableAssign(this.pagination, { currentPage: page })
51 const params = {
52 videoPagination: newPagination,
53 sort: this.sort
54 }
49 55
50 return this.videoService.getUserSubscriptionVideos(newPagination, this.sort) 56 return this.hooks.wrapObsFun(
57 this.videoService.getUserSubscriptionVideos.bind(this.videoService),
58 params,
59 'common',
60 'filter:api.videos.list.user-subscriptions.params',
61 'filter:api.videos.list.user-subscriptions.result'
62 )
51 } 63 }
52 64
53 generateSyndicationList () { 65 generateSyndicationList () {