diff options
author | Chocobozzz <me@florianbigard.com> | 2018-04-17 10:56:27 +0200 |
---|---|---|
committer | Chocobozzz <me@florianbigard.com> | 2018-04-17 10:56:27 +0200 |
commit | 7b87d2d5141d0eb48db2a3fd162208d6a79b2035 (patch) | |
tree | 6c7b40ae79671fa2cf1b8418092acca031006d07 /client/src/app/shared/video/abstract-video-list.ts | |
parent | cc1561f9f7b33d739d66b23bacae23ea49f2fa12 (diff) | |
download | PeerTube-7b87d2d5141d0eb48db2a3fd162208d6a79b2035.tar.gz PeerTube-7b87d2d5141d0eb48db2a3fd162208d6a79b2035.tar.zst PeerTube-7b87d2d5141d0eb48db2a3fd162208d6a79b2035.zip |
Handle sort in rss
Diffstat (limited to 'client/src/app/shared/video/abstract-video-list.ts')
-rw-r--r-- | client/src/app/shared/video/abstract-video-list.ts | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/client/src/app/shared/video/abstract-video-list.ts b/client/src/app/shared/video/abstract-video-list.ts index c1c07e628..7f2cf2d7e 100644 --- a/client/src/app/shared/video/abstract-video-list.ts +++ b/client/src/app/shared/video/abstract-video-list.ts | |||
@@ -9,7 +9,7 @@ import { fromEvent } from 'rxjs/observable/fromEvent' | |||
9 | import { Subscription } from 'rxjs/Subscription' | 9 | import { Subscription } from 'rxjs/Subscription' |
10 | import { AuthService } from '../../core/auth' | 10 | import { AuthService } from '../../core/auth' |
11 | import { ComponentPagination } from '../rest/component-pagination.model' | 11 | import { ComponentPagination } from '../rest/component-pagination.model' |
12 | import { SortField } from './sort-field.type' | 12 | import { VideoSortField } from './sort-field.type' |
13 | import { Video } from './video.model' | 13 | import { Video } from './video.model' |
14 | 14 | ||
15 | export abstract class AbstractVideoList implements OnInit, OnDestroy { | 15 | export abstract class AbstractVideoList implements OnInit, OnDestroy { |
@@ -23,8 +23,8 @@ export abstract class AbstractVideoList implements OnInit, OnDestroy { | |||
23 | itemsPerPage: 10, | 23 | itemsPerPage: 10, |
24 | totalItems: null | 24 | totalItems: null |
25 | } | 25 | } |
26 | sort: SortField = '-createdAt' | 26 | sort: VideoSortField = '-createdAt' |
27 | defaultSort: SortField = '-createdAt' | 27 | defaultSort: VideoSortField = '-createdAt' |
28 | syndicationItems = [] | 28 | syndicationItems = [] |
29 | 29 | ||
30 | loadOnInit = true | 30 | loadOnInit = true |
@@ -154,7 +154,7 @@ export abstract class AbstractVideoList implements OnInit, OnDestroy { | |||
154 | } | 154 | } |
155 | 155 | ||
156 | protected loadRouteParams (routeParams: { [ key: string ]: any }) { | 156 | protected loadRouteParams (routeParams: { [ key: string ]: any }) { |
157 | this.sort = routeParams['sort'] as SortField || this.defaultSort | 157 | this.sort = routeParams['sort'] as VideoSortField || this.defaultSort |
158 | 158 | ||
159 | if (routeParams['page'] !== undefined) { | 159 | if (routeParams['page'] !== undefined) { |
160 | this.pagination.currentPage = parseInt(routeParams['page'], 10) | 160 | this.pagination.currentPage = parseInt(routeParams['page'], 10) |