]> git.immae.eu Git - github/Chocobozzz/PeerTube.git/blobdiff - client/src/app/videos/video-list/video-trending.component.ts
Add links support in comments
[github/Chocobozzz/PeerTube.git] / client / src / app / videos / video-list / video-trending.component.ts
index fc48086d6ec184cdd0f086342e71b9ea1ba0e309..a42457273125d8c790086767d338d4436dbde9c3 100644 (file)
@@ -1,5 +1,6 @@
 import { Component, OnInit } from '@angular/core'
 import { ActivatedRoute, Router } from '@angular/router'
+import { immutableAssign } from '@app/shared/misc/utils'
 import { NotificationsService } from 'angular2-notifications'
 import { AuthService } from '../../core/auth'
 import { AbstractVideoList } from '../../shared/video/abstract-video-list'
@@ -28,7 +29,8 @@ export class VideoTrendingComponent extends AbstractVideoList implements OnInit
     super.ngOnInit()
   }
 
-  getVideosObservable () {
-    return this.videoService.getVideos(this.pagination, this.sort)
+  getVideosObservable (page: number) {
+    const newPagination = immutableAssign(this.pagination, { currentPage: page })
+    return this.videoService.getVideos(newPagination, this.sort)
   }
 }