diff options
Diffstat (limited to 'client/src/app/core')
-rw-r--r-- | client/src/app/core/server/server.service.ts | 13 |
1 files changed, 4 insertions, 9 deletions
diff --git a/client/src/app/core/server/server.service.ts b/client/src/app/core/server/server.service.ts index 87280e16f..7b11c068e 100644 --- a/client/src/app/core/server/server.service.ts +++ b/client/src/app/core/server/server.service.ts | |||
@@ -2,13 +2,14 @@ import { map, share, switchMap, tap } from 'rxjs/operators' | |||
2 | import { HttpClient } from '@angular/common/http' | 2 | import { HttpClient } from '@angular/common/http' |
3 | import { Inject, Injectable, LOCALE_ID } from '@angular/core' | 3 | import { Inject, Injectable, LOCALE_ID } from '@angular/core' |
4 | import { peertubeLocalStorage } from '@app/shared/misc/peertube-local-storage' | 4 | import { peertubeLocalStorage } from '@app/shared/misc/peertube-local-storage' |
5 | import { Observable, ReplaySubject, of } from 'rxjs' | 5 | import { Observable, of, ReplaySubject } from 'rxjs' |
6 | import { getCompleteLocale, ServerConfig } from '../../../../../shared' | 6 | import { getCompleteLocale, ServerConfig } from '../../../../../shared' |
7 | import { About } from '../../../../../shared/models/server/about.model' | 7 | import { About } from '../../../../../shared/models/server/about.model' |
8 | import { environment } from '../../../environments/environment' | 8 | import { environment } from '../../../environments/environment' |
9 | import { VideoConstant, VideoPrivacy } from '../../../../../shared/models/videos' | 9 | import { VideoConstant } from '../../../../../shared/models/videos' |
10 | import { isDefaultLocale } from '../../../../../shared/models/i18n' | 10 | import { isDefaultLocale } from '../../../../../shared/models/i18n' |
11 | import { getDevLocale, isOnDevLocale, peertubeTranslate } from '@app/shared/i18n/i18n-utils' | 11 | import { getDevLocale, isOnDevLocale, peertubeTranslate } from '@app/shared/i18n/i18n-utils' |
12 | import { sortBy } from '@app/shared/misc/utils' | ||
12 | 13 | ||
13 | @Injectable() | 14 | @Injectable() |
14 | export class ServerService { | 15 | export class ServerService { |
@@ -156,13 +157,7 @@ export class ServerService { | |||
156 | }) | 157 | }) |
157 | }) | 158 | }) |
158 | 159 | ||
159 | if (sort === true) { | 160 | if (sort === true) sortBy(hashToPopulate, 'label') |
160 | hashToPopulate.sort((a, b) => { | ||
161 | if (a.label < b.label) return -1 | ||
162 | if (a.label === b.label) return 0 | ||
163 | return 1 | ||
164 | }) | ||
165 | } | ||
166 | 161 | ||
167 | notifier.next(true) | 162 | notifier.next(true) |
168 | }) | 163 | }) |