diff options
Diffstat (limited to 'client/src/app/+video-channels')
-rw-r--r-- | client/src/app/+video-channels/video-channel-playlists/video-channel-playlists.component.ts | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/client/src/app/+video-channels/video-channel-playlists/video-channel-playlists.component.ts b/client/src/app/+video-channels/video-channel-playlists/video-channel-playlists.component.ts index 907aefae1..7990044a2 100644 --- a/client/src/app/+video-channels/video-channel-playlists/video-channel-playlists.component.ts +++ b/client/src/app/+video-channels/video-channel-playlists/video-channel-playlists.component.ts | |||
@@ -5,7 +5,7 @@ import { VideoChannel } from '@app/shared/video-channel/video-channel.model' | |||
5 | import { Subscription } from 'rxjs' | 5 | import { Subscription } from 'rxjs' |
6 | import { Notifier } from '@app/core' | 6 | import { Notifier } from '@app/core' |
7 | import { VideoPlaylist } from '@app/shared/video-playlist/video-playlist.model' | 7 | import { VideoPlaylist } from '@app/shared/video-playlist/video-playlist.model' |
8 | import { ComponentPagination } from '@app/shared/rest/component-pagination.model' | 8 | import { ComponentPagination, hasMoreItems } from '@app/shared/rest/component-pagination.model' |
9 | import { VideoPlaylistService } from '@app/shared/video-playlist/video-playlist.service' | 9 | import { VideoPlaylistService } from '@app/shared/video-playlist/video-playlist.service' |
10 | 10 | ||
11 | @Component({ | 11 | @Component({ |
@@ -46,8 +46,7 @@ export class VideoChannelPlaylistsComponent implements OnInit, OnDestroy { | |||
46 | } | 46 | } |
47 | 47 | ||
48 | onNearOfBottom () { | 48 | onNearOfBottom () { |
49 | // Last page | 49 | if (!hasMoreItems(this.pagination)) return |
50 | if (this.pagination.totalItems <= (this.pagination.currentPage * this.pagination.itemsPerPage)) return | ||
51 | 50 | ||
52 | this.pagination.currentPage += 1 | 51 | this.pagination.currentPage += 1 |
53 | this.loadVideoPlaylists() | 52 | this.loadVideoPlaylists() |