aboutsummaryrefslogtreecommitdiffhomepage
path: root/client/src/app/shared/shared-user-settings
diff options
context:
space:
mode:
Diffstat (limited to 'client/src/app/shared/shared-user-settings')
-rw-r--r--client/src/app/shared/shared-user-settings/user-interface-settings.component.ts27
-rw-r--r--client/src/app/shared/shared-user-settings/user-video-settings.component.ts15
2 files changed, 23 insertions, 19 deletions
diff --git a/client/src/app/shared/shared-user-settings/user-interface-settings.component.ts b/client/src/app/shared/shared-user-settings/user-interface-settings.component.ts
index b721604e5..bd1cb0353 100644
--- a/client/src/app/shared/shared-user-settings/user-interface-settings.component.ts
+++ b/client/src/app/shared/shared-user-settings/user-interface-settings.component.ts
@@ -65,18 +65,21 @@ export class UserInterfaceSettingsComponent extends FormReactive implements OnIn
65 } 65 }
66 66
67 if (this.authService.isLoggedIn()) { 67 if (this.authService.isLoggedIn()) {
68 this.userService.updateMyProfile(details).subscribe( 68 this.userService.updateMyProfile(details)
69 () => { 69 .subscribe({
70 this.authService.refreshUserInformation() 70 next: () => {
71 71 this.authService.refreshUserInformation()
72 if (this.notifyOnUpdate) this.notifier.success($localize`Interface settings updated.`) 72
73 }, 73 if (this.notifyOnUpdate) this.notifier.success($localize`Interface settings updated.`)
74 74 },
75 err => this.notifier.error(err.message) 75
76 ) 76 error: err => this.notifier.error(err.message)
77 } else { 77 })
78 this.userService.updateMyAnonymousProfile(details) 78
79 if (this.notifyOnUpdate) this.notifier.success($localize`Interface settings updated.`) 79 return
80 } 80 }
81
82 this.userService.updateMyAnonymousProfile(details)
83 if (this.notifyOnUpdate) this.notifier.success($localize`Interface settings updated.`)
81 } 84 }
82} 85}
diff --git a/client/src/app/shared/shared-user-settings/user-video-settings.component.ts b/client/src/app/shared/shared-user-settings/user-video-settings.component.ts
index 8b0eaea4f..4aac60c2b 100644
--- a/client/src/app/shared/shared-user-settings/user-video-settings.component.ts
+++ b/client/src/app/shared/shared-user-settings/user-video-settings.component.ts
@@ -162,15 +162,16 @@ export class UserVideoSettingsComponent extends FormReactive implements OnInit,
162 } 162 }
163 163
164 private updateLoggedProfile (details: UserUpdateMe) { 164 private updateLoggedProfile (details: UserUpdateMe) {
165 this.userService.updateMyProfile(details).subscribe( 165 this.userService.updateMyProfile(details)
166 () => { 166 .subscribe({
167 this.authService.refreshUserInformation() 167 next: () => {
168 this.authService.refreshUserInformation()
168 169
169 if (this.notifyOnUpdate) this.notifier.success($localize`Video settings updated.`) 170 if (this.notifyOnUpdate) this.notifier.success($localize`Video settings updated.`)
170 }, 171 },
171 172
172 err => this.notifier.error(err.message) 173 error: err => this.notifier.error(err.message)
173 ) 174 })
174 } 175 }
175 176
176 private updateAnonymousProfile (details: UserUpdateMe) { 177 private updateAnonymousProfile (details: UserUpdateMe) {