X-Git-Url: https://git.immae.eu/?a=blobdiff_plain;f=client%2Fsrc%2Fapp%2Fshared%2Fvideo%2Fabstract-video-list.ts;h=7f2cf2d7eec20fb2ee33a001b7796eddc1753e12;hb=2243730c8edf210c0a3ffc161bac89785f6a52f0;hp=024834dfc05fe14adaf461909b8d76b6f2d8f41b;hpb=244e76a552ef05a5067134b1065d26dd89246d8c;p=github%2FChocobozzz%2FPeerTube.git diff --git a/client/src/app/shared/video/abstract-video-list.ts b/client/src/app/shared/video/abstract-video-list.ts index 024834dfc..7f2cf2d7e 100644 --- a/client/src/app/shared/video/abstract-video-list.ts +++ b/client/src/app/shared/video/abstract-video-list.ts @@ -3,17 +3,14 @@ import { ActivatedRoute, Router } from '@angular/router' import { isInMobileView } from '@app/shared/misc/utils' import { InfiniteScrollerDirective } from '@app/shared/video/infinite-scroller.directive' import { NotificationsService } from 'angular2-notifications' -import { PopoverModule } from 'ngx-bootstrap/popover' import 'rxjs/add/operator/debounceTime' import { Observable } from 'rxjs/Observable' import { fromEvent } from 'rxjs/observable/fromEvent' import { Subscription } from 'rxjs/Subscription' import { AuthService } from '../../core/auth' import { ComponentPagination } from '../rest/component-pagination.model' -import { SortField } from './sort-field.type' +import { VideoSortField } from './sort-field.type' import { Video } from './video.model' -import { FeedFormat } from '../../../../../shared' -import { VideoFeedComponent } from '@app/shared/video/video-feed.component' export abstract class AbstractVideoList implements OnInit, OnDestroy { private static LINES_PER_PAGE = 4 @@ -26,9 +23,9 @@ export abstract class AbstractVideoList implements OnInit, OnDestroy { itemsPerPage: 10, totalItems: null } - sort: SortField = '-createdAt' - defaultSort: SortField = '-createdAt' - syndicationItems = {} + sort: VideoSortField = '-createdAt' + defaultSort: VideoSortField = '-createdAt' + syndicationItems = [] loadOnInit = true pageHeight: number @@ -157,7 +154,7 @@ export abstract class AbstractVideoList implements OnInit, OnDestroy { } protected loadRouteParams (routeParams: { [ key: string ]: any }) { - this.sort = routeParams['sort'] as SortField || this.defaultSort + this.sort = routeParams['sort'] as VideoSortField || this.defaultSort if (routeParams['page'] !== undefined) { this.pagination.currentPage = parseInt(routeParams['page'], 10)