aboutsummaryrefslogtreecommitdiffhomepage
path: root/client/src/app/videos/video-list/video-trending.component.ts
diff options
context:
space:
mode:
authorChocobozzz <me@florianbigard.com>2018-02-13 14:11:05 +0100
committerChocobozzz <me@florianbigard.com>2018-02-13 14:20:46 +0100
commit0cd4344f3cf529b15308fcf3eb7d7eb07726df56 (patch)
tree276f6e8cfe72d583114d82fd5db981550a395488 /client/src/app/videos/video-list/video-trending.component.ts
parent29c6b829446a6fb29dffc6b7b638079ce60f3771 (diff)
downloadPeerTube-0cd4344f3cf529b15308fcf3eb7d7eb07726df56.tar.gz
PeerTube-0cd4344f3cf529b15308fcf3eb7d7eb07726df56.tar.zst
PeerTube-0cd4344f3cf529b15308fcf3eb7d7eb07726df56.zip
Rewrite infinite scroll
Diffstat (limited to 'client/src/app/videos/video-list/video-trending.component.ts')
-rw-r--r--client/src/app/videos/video-list/video-trending.component.ts6
1 files changed, 4 insertions, 2 deletions
diff --git a/client/src/app/videos/video-list/video-trending.component.ts b/client/src/app/videos/video-list/video-trending.component.ts
index fc48086d6..a42457273 100644
--- a/client/src/app/videos/video-list/video-trending.component.ts
+++ b/client/src/app/videos/video-list/video-trending.component.ts
@@ -1,5 +1,6 @@
1import { Component, OnInit } from '@angular/core' 1import { Component, OnInit } from '@angular/core'
2import { ActivatedRoute, Router } from '@angular/router' 2import { ActivatedRoute, Router } from '@angular/router'
3import { immutableAssign } from '@app/shared/misc/utils'
3import { NotificationsService } from 'angular2-notifications' 4import { NotificationsService } from 'angular2-notifications'
4import { AuthService } from '../../core/auth' 5import { AuthService } from '../../core/auth'
5import { AbstractVideoList } from '../../shared/video/abstract-video-list' 6import { AbstractVideoList } from '../../shared/video/abstract-video-list'
@@ -28,7 +29,8 @@ export class VideoTrendingComponent extends AbstractVideoList implements OnInit
28 super.ngOnInit() 29 super.ngOnInit()
29 } 30 }
30 31
31 getVideosObservable () { 32 getVideosObservable (page: number) {
32 return this.videoService.getVideos(this.pagination, this.sort) 33 const newPagination = immutableAssign(this.pagination, { currentPage: page })
34 return this.videoService.getVideos(newPagination, this.sort)
33 } 35 }
34} 36}