diff options
author | Chocobozzz <me@florianbigard.com> | 2023-02-20 10:17:03 +0100 |
---|---|---|
committer | Chocobozzz <me@florianbigard.com> | 2023-02-20 10:18:05 +0100 |
commit | 15825ef18d3b2bb74f4e613496cf3e2921a87389 (patch) | |
tree | d68b590baa98b090c212a117317c21059e064725 /client/src/app/app.module.ts | |
parent | 5471449f998eec270b184e6080e6f9853e5d722a (diff) | |
download | PeerTube-15825ef18d3b2bb74f4e613496cf3e2921a87389.tar.gz PeerTube-15825ef18d3b2bb74f4e613496cf3e2921a87389.tar.zst PeerTube-15825ef18d3b2bb74f4e613496cf3e2921a87389.zip |
Fix default trending algorithm in admin config
Diffstat (limited to 'client/src/app/app.module.ts')
-rw-r--r-- | client/src/app/app.module.ts | 16 |
1 files changed, 10 insertions, 6 deletions
diff --git a/client/src/app/app.module.ts b/client/src/app/app.module.ts index bb20c2d83..7e4fac730 100644 --- a/client/src/app/app.module.ts +++ b/client/src/app/app.module.ts | |||
@@ -8,7 +8,7 @@ import { ServiceWorkerModule } from '@angular/service-worker' | |||
8 | import localeOc from '@app/helpers/locales/oc' | 8 | import localeOc from '@app/helpers/locales/oc' |
9 | import { AppRoutingModule } from './app-routing.module' | 9 | import { AppRoutingModule } from './app-routing.module' |
10 | import { AppComponent } from './app.component' | 10 | import { AppComponent } from './app.component' |
11 | import { CoreModule, PluginService, ServerService } from './core' | 11 | import { CoreModule, PluginService, RedirectService, ServerService } from './core' |
12 | import { EmptyComponent } from './empty.component' | 12 | import { EmptyComponent } from './empty.component' |
13 | import { HeaderComponent, SearchTypeaheadComponent, SuggestionComponent } from './header' | 13 | import { HeaderComponent, SearchTypeaheadComponent, SuggestionComponent } from './header' |
14 | import { HighlightPipe } from './header/highlight.pipe' | 14 | import { HighlightPipe } from './header/highlight.pipe' |
@@ -28,13 +28,17 @@ import { SharedUserInterfaceSettingsModule } from './shared/shared-user-settings | |||
28 | 28 | ||
29 | registerLocaleData(localeOc, 'oc') | 29 | registerLocaleData(localeOc, 'oc') |
30 | 30 | ||
31 | export function loadConfigFactory (server: ServerService, pluginService: PluginService) { | 31 | export function loadConfigFactory (server: ServerService, pluginService: PluginService, redirectService: RedirectService) { |
32 | const initializeServices = () => { | ||
33 | redirectService.init() | ||
34 | pluginService.initializePlugins() | ||
35 | } | ||
36 | |||
32 | return () => { | 37 | return () => { |
33 | const result = server.loadHTMLConfig() | 38 | const result = server.loadHTMLConfig() |
39 | if (result) return result.pipe(tap(() => initializeServices())) | ||
34 | 40 | ||
35 | if (result) return result.pipe(tap(() => pluginService.initializePlugins())) | 41 | initializeServices() |
36 | |||
37 | return pluginService.initializePlugins() | ||
38 | } | 42 | } |
39 | } | 43 | } |
40 | 44 | ||
@@ -84,7 +88,7 @@ export function loadConfigFactory (server: ServerService, pluginService: PluginS | |||
84 | { | 88 | { |
85 | provide: APP_INITIALIZER, | 89 | provide: APP_INITIALIZER, |
86 | useFactory: loadConfigFactory, | 90 | useFactory: loadConfigFactory, |
87 | deps: [ ServerService, PluginService ], | 91 | deps: [ ServerService, PluginService, RedirectService ], |
88 | multi: true | 92 | multi: true |
89 | } | 93 | } |
90 | ] | 94 | ] |