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 --- client/src/app/videos/video-list/video-most-liked.component.ts | 7 ++----- client/src/app/videos/video-list/video-trending.component.ts | 6 +++--- 2 files changed, 5 insertions(+), 8 deletions(-) (limited to 'client/src/app/videos/video-list') diff --git a/client/src/app/videos/video-list/video-most-liked.component.ts b/client/src/app/videos/video-list/video-most-liked.component.ts index aff8413eb..f94a7da04 100644 --- a/client/src/app/videos/video-list/video-most-liked.component.ts +++ b/client/src/app/videos/video-list/video-most-liked.component.ts @@ -40,11 +40,8 @@ export class VideoMostLikedComponent extends AbstractVideoList implements OnInit this.generateSyndicationList() - this.serverService.configLoaded.subscribe( - () => { - this.titlePage = this.i18n('Most liked videos') - this.titleTooltip = this.i18n('Videos that have the higher number of likes.') - }) + this.titlePage = this.i18n('Most liked videos') + this.titleTooltip = this.i18n('Videos that have the higher number of likes.') } getVideosObservable (page: number) { diff --git a/client/src/app/videos/video-list/video-trending.component.ts b/client/src/app/videos/video-list/video-trending.component.ts index 19324da63..bc88679fa 100644 --- a/client/src/app/videos/video-list/video-trending.component.ts +++ b/client/src/app/videos/video-list/video-trending.component.ts @@ -40,9 +40,9 @@ export class VideoTrendingComponent extends AbstractVideoList implements OnInit, this.generateSyndicationList() - this.serverService.configLoaded.subscribe( - () => { - const trendingDays = this.serverService.getConfig().trending.videos.intervalDays + this.serverService.getConfig().subscribe( + config => { + const trendingDays = config.trending.videos.intervalDays if (trendingDays === 1) { this.titlePage = this.i18n('Trending for the last 24 hours') -- cgit v1.2.3