From 213bb3bb58b719679d533811b2e2c3852a3dd067 Mon Sep 17 00:00:00 2001 From: Chocobozzz Date: Mon, 10 Oct 2022 15:04:27 +0200 Subject: [PATCH] Fix user channels list with increased max counter --- .../shared-main/video-channel/video-channel.service.ts | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/client/src/app/shared/shared-main/video-channel/video-channel.service.ts b/client/src/app/shared/shared-main/video-channel/video-channel.service.ts index 5e3985526..08811afec 100644 --- a/client/src/app/shared/shared-main/video-channel/video-channel.service.ts +++ b/client/src/app/shared/shared-main/video-channel/video-channel.service.ts @@ -2,7 +2,7 @@ import { Observable, ReplaySubject } from 'rxjs' import { catchError, map, tap } from 'rxjs/operators' import { HttpClient, HttpParams } from '@angular/common/http' import { Injectable } from '@angular/core' -import { ComponentPaginationLight, RestExtractor, RestService } from '@app/core' +import { ComponentPaginationLight, RestExtractor, RestService, ServerService } from '@app/core' import { ActorImage, ResultList, @@ -25,7 +25,8 @@ export class VideoChannelService { constructor ( private authHttp: HttpClient, private restService: RestService, - private restExtractor: RestExtractor + private restExtractor: RestExtractor, + private serverService: ServerService ) { } static extractVideoChannels (result: ResultList) { @@ -56,9 +57,11 @@ export class VideoChannelService { }): Observable> { const { account, componentPagination, withStats = false, sort, search } = options + const defaultCount = this.serverService.getHTMLConfig().videoChannels.maxPerUser + const pagination = componentPagination ? this.restService.componentToRestPagination(componentPagination) - : { start: 0, count: 20 } + : { start: 0, count: defaultCount } let params = new HttpParams() params = this.restService.addRestGetParams(params, pagination, sort)