import { VideoService } from '@app/shared/video/video.service'
import { VideoSortField } from '@app/shared/video/sort-field.type'
import { ComponentPagination, hasMoreItems } from '@app/shared/rest/component-pagination.model'
+import { ScreenService } from '@app/shared/misc/screen.service'
@Component({
selector: 'my-account-video-channels',
channelPagination: ComponentPagination = {
currentPage: 1,
- itemsPerPage: 2
+ itemsPerPage: 2,
+ totalItems: null
}
videosPagination: ComponentPagination = {
currentPage: 1,
- itemsPerPage: 12
+ itemsPerPage: 12,
+ totalItems: null
}
videosSort: VideoSortField = '-publishedAt'
private authService: AuthService,
private accountService: AccountService,
private videoChannelService: VideoChannelService,
- private videoService: VideoService
+ private videoService: VideoService,
+ private screenService: ScreenService
) { }
get user () {
}
getVideosOf (videoChannel: VideoChannel) {
- return this.videos[ videoChannel.id ]
+ const numberOfVideos = this.screenService.getNumberOfAvailableMiniatures()
+
+ // 2 rows
+ return this.videos[ videoChannel.id ].slice(0, numberOfVideos * 2)
}
onNearOfBottom () {