From: Chocobozzz Date: Fri, 13 Dec 2019 08:32:36 +0000 (+0100) Subject: Fix theme loading X-Git-Tag: v2.1.0-rc.1~209 X-Git-Url: https://git.librecmc.org/?a=commitdiff_plain;h=7c93905d14bf7d86d04dbbffc6e6a510c852f360;p=oweals%2Fpeertube.git Fix theme loading --- diff --git a/client/src/app/core/theme/theme.service.ts b/client/src/app/core/theme/theme.service.ts index 9be8e7a2d..3eebc1acc 100644 --- a/client/src/app/core/theme/theme.service.ts +++ b/client/src/app/core/theme/theme.service.ts @@ -5,6 +5,7 @@ import { environment } from '../../../environments/environment' import { PluginService } from '@app/core/plugins/plugin.service' import { ServerConfigTheme } from '@shared/models' import { peertubeLocalStorage } from '@app/shared/misc/peertube-web-storage' +import { first } from 'rxjs/operators' @Injectable() export class ThemeService { @@ -123,6 +124,7 @@ export class ThemeService { } this.auth.userInformationLoaded + .pipe(first()) .subscribe(() => this.updateCurrentTheme()) } diff --git a/client/src/app/videos/+video-watch/video-watch.component.ts b/client/src/app/videos/+video-watch/video-watch.component.ts index 8378e83b8..12b74a846 100644 --- a/client/src/app/videos/+video-watch/video-watch.component.ts +++ b/client/src/app/videos/+video-watch/video-watch.component.ts @@ -279,14 +279,14 @@ export class VideoWatchComponent implements OnInit, OnDestroy { isAutoPlayEnabled () { return ( - this.user && this.user.autoPlayNextVideo || + (this.user && this.user.autoPlayNextVideo) || peertubeSessionStorage.getItem(RecommendedVideosComponent.SESSION_STORAGE_AUTO_PLAY_NEXT_VIDEO) === 'true' ) } isPlaylistAutoPlayEnabled () { return ( - this.user && this.user.autoPlayNextVideoPlaylist || + (this.user && this.user.autoPlayNextVideoPlaylist) || peertubeSessionStorage.getItem(VideoWatchPlaylistComponent.SESSION_STORAGE_AUTO_PLAY_NEXT_VIDEO_PLAYLIST) === 'true' ) }