]> git.immae.eu Git - github/Chocobozzz/PeerTube.git/commitdiff
Fix auto play setting for anonymous users
authorChocobozzz <me@florianbigard.com>
Mon, 23 Jan 2023 14:24:58 +0000 (15:24 +0100)
committerChocobozzz <me@florianbigard.com>
Mon, 23 Jan 2023 14:24:58 +0000 (15:24 +0100)
client/src/app/core/users/user-local-storage.service.ts
client/src/app/shared/shared-user-settings/user-video-settings.component.ts

index a047efe8e96bbf227e882f169209fc94a53642c0..d5fd1e447db675ccb1b1cc157fda280190db7f16 100644 (file)
@@ -125,7 +125,8 @@ export class UserLocalStorageService {
     const localStorageKeys: { [ id in keyof UserUpdateMe ]: string } = {
       nsfwPolicy: UserLocalStorageKeys.NSFW_POLICY,
       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,
       theme: UserLocalStorageKeys.THEME,
       videoLanguages: UserLocalStorageKeys.VIDEO_LANGUAGES
index af0870f127c8e7358dad6347eb7809cae49760a9..ed6e7fffd3352e4e59e23d42c2fa0e60a8c24674 100644 (file)
@@ -127,6 +127,9 @@ export class UserVideoSettingsComponent extends FormReactive implements OnInit,
 
   private updateAnonymousProfile (details: UserUpdateMe) {
     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.`)
+    }
   }
 }