Fix auto play setting for anonymous users

pull/5551/head
Chocobozzz 2023-01-23 15:24:58 +01:00
parent 823e411fa6
commit b1d8261c45
No known key found for this signature in database
GPG Key ID: 583A612D890159BE
2 changed files with 6 additions and 2 deletions

View File

@ -125,7 +125,8 @@ export class UserLocalStorageService {
const localStorageKeys: { [ id in keyof UserUpdateMe ]: string } = { const localStorageKeys: { [ id in keyof UserUpdateMe ]: string } = {
nsfwPolicy: UserLocalStorageKeys.NSFW_POLICY, nsfwPolicy: UserLocalStorageKeys.NSFW_POLICY,
p2pEnabled: UserLocalStorageKeys.P2P_ENABLED, p2pEnabled: UserLocalStorageKeys.P2P_ENABLED,
autoPlayNextVideo: UserLocalStorageKeys.AUTO_PLAY_VIDEO, autoPlayVideo: UserLocalStorageKeys.AUTO_PLAY_VIDEO,
autoPlayNextVideo: UserLocalStorageKeys.AUTO_PLAY_NEXT_VIDEO,
autoPlayNextVideoPlaylist: UserLocalStorageKeys.AUTO_PLAY_VIDEO_PLAYLIST, autoPlayNextVideoPlaylist: UserLocalStorageKeys.AUTO_PLAY_VIDEO_PLAYLIST,
theme: UserLocalStorageKeys.THEME, theme: UserLocalStorageKeys.THEME,
videoLanguages: UserLocalStorageKeys.VIDEO_LANGUAGES videoLanguages: UserLocalStorageKeys.VIDEO_LANGUAGES

View File

@ -127,6 +127,9 @@ export class UserVideoSettingsComponent extends FormReactive implements OnInit,
private updateAnonymousProfile (details: UserUpdateMe) { private updateAnonymousProfile (details: UserUpdateMe) {
this.userService.updateMyAnonymousProfile(details) this.userService.updateMyAnonymousProfile(details)
if (this.notifyOnUpdate) this.notifier.success($localize`Display/Video settings updated.`)
if (this.notifyOnUpdate) {
this.notifier.success($localize`Display/Video settings updated.`)
}
} }
} }