diff options
Diffstat (limited to 'client/src/app/shared/shared-video-miniature/video-filters.model.ts')
-rw-r--r-- | client/src/app/shared/shared-video-miniature/video-filters.model.ts | 9 |
1 files changed, 8 insertions, 1 deletions
diff --git a/client/src/app/shared/shared-video-miniature/video-filters.model.ts b/client/src/app/shared/shared-video-miniature/video-filters.model.ts index a3b8129f0..920dc826c 100644 --- a/client/src/app/shared/shared-video-miniature/video-filters.model.ts +++ b/client/src/app/shared/shared-video-miniature/video-filters.model.ts | |||
@@ -38,10 +38,14 @@ export class VideoFilters { | |||
38 | private onChangeCallbacks: Array<() => void> = [] | 38 | private onChangeCallbacks: Array<() => void> = [] |
39 | private oldFormObjectString: string | 39 | private oldFormObjectString: string |
40 | 40 | ||
41 | constructor (defaultSort: string, defaultScope: VideoFilterScope) { | 41 | private readonly hiddenFields: string[] = [] |
42 | |||
43 | constructor (defaultSort: string, defaultScope: VideoFilterScope, hiddenFields: string[] = []) { | ||
42 | this.setDefaultSort(defaultSort) | 44 | this.setDefaultSort(defaultSort) |
43 | this.setDefaultScope(defaultScope) | 45 | this.setDefaultScope(defaultScope) |
44 | 46 | ||
47 | this.hiddenFields = hiddenFields | ||
48 | |||
45 | this.reset() | 49 | this.reset() |
46 | } | 50 | } |
47 | 51 | ||
@@ -160,6 +164,9 @@ export class VideoFilters { | |||
160 | label: $localize`VOD videos` | 164 | label: $localize`VOD videos` |
161 | }) | 165 | }) |
162 | } | 166 | } |
167 | |||
168 | this.activeFilters = this.activeFilters | ||
169 | .filter(a => this.hiddenFields.includes(a.key) === false) | ||
163 | } | 170 | } |
164 | 171 | ||
165 | getActiveFilters () { | 172 | getActiveFilters () { |