mirror of https://github.com/Chocobozzz/PeerTube
Fix theme loading
parent
94dfca3e35
commit
7c93905d14
|
@ -5,6 +5,7 @@ import { environment } from '../../../environments/environment'
|
||||||
import { PluginService } from '@app/core/plugins/plugin.service'
|
import { PluginService } from '@app/core/plugins/plugin.service'
|
||||||
import { ServerConfigTheme } from '@shared/models'
|
import { ServerConfigTheme } from '@shared/models'
|
||||||
import { peertubeLocalStorage } from '@app/shared/misc/peertube-web-storage'
|
import { peertubeLocalStorage } from '@app/shared/misc/peertube-web-storage'
|
||||||
|
import { first } from 'rxjs/operators'
|
||||||
|
|
||||||
@Injectable()
|
@Injectable()
|
||||||
export class ThemeService {
|
export class ThemeService {
|
||||||
|
@ -123,6 +124,7 @@ export class ThemeService {
|
||||||
}
|
}
|
||||||
|
|
||||||
this.auth.userInformationLoaded
|
this.auth.userInformationLoaded
|
||||||
|
.pipe(first())
|
||||||
.subscribe(() => this.updateCurrentTheme())
|
.subscribe(() => this.updateCurrentTheme())
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -279,14 +279,14 @@ export class VideoWatchComponent implements OnInit, OnDestroy {
|
||||||
|
|
||||||
isAutoPlayEnabled () {
|
isAutoPlayEnabled () {
|
||||||
return (
|
return (
|
||||||
this.user && this.user.autoPlayNextVideo ||
|
(this.user && this.user.autoPlayNextVideo) ||
|
||||||
peertubeSessionStorage.getItem(RecommendedVideosComponent.SESSION_STORAGE_AUTO_PLAY_NEXT_VIDEO) === 'true'
|
peertubeSessionStorage.getItem(RecommendedVideosComponent.SESSION_STORAGE_AUTO_PLAY_NEXT_VIDEO) === 'true'
|
||||||
)
|
)
|
||||||
}
|
}
|
||||||
|
|
||||||
isPlaylistAutoPlayEnabled () {
|
isPlaylistAutoPlayEnabled () {
|
||||||
return (
|
return (
|
||||||
this.user && this.user.autoPlayNextVideoPlaylist ||
|
(this.user && this.user.autoPlayNextVideoPlaylist) ||
|
||||||
peertubeSessionStorage.getItem(VideoWatchPlaylistComponent.SESSION_STORAGE_AUTO_PLAY_NEXT_VIDEO_PLAYLIST) === 'true'
|
peertubeSessionStorage.getItem(VideoWatchPlaylistComponent.SESSION_STORAGE_AUTO_PLAY_NEXT_VIDEO_PLAYLIST) === 'true'
|
||||||
)
|
)
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue