From ba430d7516bc5b1324b60571ba7594460969b7fb Mon Sep 17 00:00:00 2001 From: Chocobozzz Date: Wed, 18 Dec 2019 15:31:54 +0100 Subject: Lazy load static objects --- .../my-account-video-settings.component.ts | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) (limited to 'client/src/app/+my-account/my-account-settings/my-account-video-settings') diff --git a/client/src/app/+my-account/my-account-settings/my-account-video-settings/my-account-video-settings.component.ts b/client/src/app/+my-account/my-account-settings/my-account-video-settings/my-account-video-settings.component.ts index 99eee23b8..a66159b3f 100644 --- a/client/src/app/+my-account/my-account-settings/my-account-video-settings/my-account-video-settings.component.ts +++ b/client/src/app/+my-account/my-account-settings/my-account-video-settings/my-account-video-settings.component.ts @@ -41,11 +41,9 @@ export class MyAccountVideoSettingsComponent extends FormReactive implements OnI }) forkJoin([ - this.serverService.videoLanguagesLoaded.pipe(first()), + this.serverService.getVideoLanguages(), this.userInformationLoaded.pipe(first()) - ]).subscribe(() => { - const languages = this.serverService.getVideoLanguages() - + ]).subscribe(([ languages ]) => { this.languageItems = [ { label: this.i18n('Unknown language'), value: '_unknown' } ] this.languageItems = this.languageItems .concat(languages.map(l => ({ label: l.label, value: l.id }))) -- cgit v1.2.3