diff options
author | Chocobozzz <me@florianbigard.com> | 2019-08-02 14:49:25 +0200 |
---|---|---|
committer | Chocobozzz <me@florianbigard.com> | 2019-08-02 14:49:25 +0200 |
commit | ad453580b20056fd80b3245d4db554f5ca1a5e29 (patch) | |
tree | ed07a6dbd8bc8cd27b22cd33dabcbd3d31deea07 /client/src/app/+my-account/my-account-video-playlists/my-account-video-playlist-elements.component.ts | |
parent | dd570a34ff731a6cd98ef8f8bf83f234e804f6c1 (diff) | |
download | PeerTube-ad453580b20056fd80b3245d4db554f5ca1a5e29.tar.gz PeerTube-ad453580b20056fd80b3245d4db554f5ca1a5e29.tar.zst PeerTube-ad453580b20056fd80b3245d4db554f5ca1a5e29.zip |
Fix infinite scroll on big screens
Diffstat (limited to 'client/src/app/+my-account/my-account-video-playlists/my-account-video-playlist-elements.component.ts')
-rw-r--r-- | client/src/app/+my-account/my-account-video-playlists/my-account-video-playlist-elements.component.ts | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/client/src/app/+my-account/my-account-video-playlists/my-account-video-playlist-elements.component.ts b/client/src/app/+my-account/my-account-video-playlists/my-account-video-playlist-elements.component.ts index 6f307a058..22c9af566 100644 --- a/client/src/app/+my-account/my-account-video-playlists/my-account-video-playlist-elements.component.ts +++ b/client/src/app/+my-account/my-account-video-playlists/my-account-video-playlist-elements.component.ts | |||
@@ -3,7 +3,7 @@ import { Notifier, ServerService } from '@app/core' | |||
3 | import { AuthService } from '../../core/auth' | 3 | import { AuthService } from '../../core/auth' |
4 | import { ConfirmService } from '../../core/confirm' | 4 | import { ConfirmService } from '../../core/confirm' |
5 | import { ComponentPagination } from '@app/shared/rest/component-pagination.model' | 5 | import { ComponentPagination } from '@app/shared/rest/component-pagination.model' |
6 | import { Subscription } from 'rxjs' | 6 | import { Subject, Subscription } from 'rxjs' |
7 | import { ActivatedRoute } from '@angular/router' | 7 | import { ActivatedRoute } from '@angular/router' |
8 | import { VideoPlaylistService } from '@app/shared/video-playlist/video-playlist.service' | 8 | import { VideoPlaylistService } from '@app/shared/video-playlist/video-playlist.service' |
9 | import { VideoPlaylist } from '@app/shared/video-playlist/video-playlist.model' | 9 | import { VideoPlaylist } from '@app/shared/video-playlist/video-playlist.model' |
@@ -22,10 +22,12 @@ export class MyAccountVideoPlaylistElementsComponent implements OnInit, OnDestro | |||
22 | 22 | ||
23 | pagination: ComponentPagination = { | 23 | pagination: ComponentPagination = { |
24 | currentPage: 1, | 24 | currentPage: 1, |
25 | itemsPerPage: 30, | 25 | itemsPerPage: 10, |
26 | totalItems: null | 26 | totalItems: null |
27 | } | 27 | } |
28 | 28 | ||
29 | onDataSubject = new Subject<any[]>() | ||
30 | |||
29 | private videoPlaylistId: string | number | 31 | private videoPlaylistId: string | number |
30 | private paramsSub: Subscription | 32 | private paramsSub: Subscription |
31 | 33 | ||
@@ -102,6 +104,8 @@ export class MyAccountVideoPlaylistElementsComponent implements OnInit, OnDestro | |||
102 | .subscribe(({ total, data }) => { | 104 | .subscribe(({ total, data }) => { |
103 | this.playlistElements = this.playlistElements.concat(data) | 105 | this.playlistElements = this.playlistElements.concat(data) |
104 | this.pagination.totalItems = total | 106 | this.pagination.totalItems = total |
107 | |||
108 | this.onDataSubject.next(data) | ||
105 | }) | 109 | }) |
106 | } | 110 | } |
107 | 111 | ||