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 {
}
this.auth.userInformationLoaded
+ .pipe(first())
.subscribe(() => this.updateCurrentTheme())
}
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'
)
}