diff options
Diffstat (limited to 'client/src/app/shared/video/abstract-video-list.ts')
-rw-r--r-- | client/src/app/shared/video/abstract-video-list.ts | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/client/src/app/shared/video/abstract-video-list.ts b/client/src/app/shared/video/abstract-video-list.ts index 1c84573da..a468d3231 100644 --- a/client/src/app/shared/video/abstract-video-list.ts +++ b/client/src/app/shared/video/abstract-video-list.ts | |||
@@ -2,7 +2,6 @@ import { debounceTime } from 'rxjs/operators' | |||
2 | import { ElementRef, OnDestroy, OnInit, ViewChild } from '@angular/core' | 2 | import { ElementRef, OnDestroy, OnInit, ViewChild } from '@angular/core' |
3 | import { ActivatedRoute, Router } from '@angular/router' | 3 | import { ActivatedRoute, Router } from '@angular/router' |
4 | import { Location } from '@angular/common' | 4 | import { Location } from '@angular/common' |
5 | import { isInMobileView } from '@app/shared/misc/utils' | ||
6 | import { InfiniteScrollerDirective } from '@app/shared/video/infinite-scroller.directive' | 5 | import { InfiniteScrollerDirective } from '@app/shared/video/infinite-scroller.directive' |
7 | import { NotificationsService } from 'angular2-notifications' | 6 | import { NotificationsService } from 'angular2-notifications' |
8 | import { fromEvent, Observable, Subscription } from 'rxjs' | 7 | import { fromEvent, Observable, Subscription } from 'rxjs' |
@@ -11,6 +10,7 @@ import { ComponentPagination } from '../rest/component-pagination.model' | |||
11 | import { VideoSortField } from './sort-field.type' | 10 | import { VideoSortField } from './sort-field.type' |
12 | import { Video } from './video.model' | 11 | import { Video } from './video.model' |
13 | import { I18n } from '@ngx-translate/i18n-polyfill' | 12 | import { I18n } from '@ngx-translate/i18n-polyfill' |
13 | import { ScreenService } from '@app/shared/misc/screen.service' | ||
14 | 14 | ||
15 | export abstract class AbstractVideoList implements OnInit, OnDestroy { | 15 | export abstract class AbstractVideoList implements OnInit, OnDestroy { |
16 | private static LINES_PER_PAGE = 4 | 16 | private static LINES_PER_PAGE = 4 |
@@ -41,6 +41,7 @@ export abstract class AbstractVideoList implements OnInit, OnDestroy { | |||
41 | protected abstract authService: AuthService | 41 | protected abstract authService: AuthService |
42 | protected abstract router: Router | 42 | protected abstract router: Router |
43 | protected abstract route: ActivatedRoute | 43 | protected abstract route: ActivatedRoute |
44 | protected abstract screenService: ScreenService | ||
44 | protected abstract i18n: I18n | 45 | protected abstract i18n: I18n |
45 | protected abstract location: Location | 46 | protected abstract location: Location |
46 | protected abstract currentRoute: string | 47 | protected abstract currentRoute: string |
@@ -199,7 +200,7 @@ export abstract class AbstractVideoList implements OnInit, OnDestroy { | |||
199 | } | 200 | } |
200 | 201 | ||
201 | private calcPageSizes () { | 202 | private calcPageSizes () { |
202 | if (isInMobileView() || this.baseVideoWidth === -1) { | 203 | if (this.screenService.isInMobileView() || this.baseVideoWidth === -1) { |
203 | this.pagination.itemsPerPage = 5 | 204 | this.pagination.itemsPerPage = 5 |
204 | 205 | ||
205 | // Video takes all the width | 206 | // Video takes all the width |