aboutsummaryrefslogtreecommitdiffhomepage
path: root/client/src/app/shared/shared-user-settings/user-interface-settings.component.ts
diff options
context:
space:
mode:
authorChocobozzz <me@florianbigard.com>2021-08-17 11:27:47 +0200
committerChocobozzz <me@florianbigard.com>2021-08-17 14:01:45 +0200
commit1378c0d343028f3d40d7d795422684ab9e6a1599 (patch)
tree08062b84a38a7e2dfe0aa674e7ca8e1b7321044e /client/src/app/shared/shared-user-settings/user-interface-settings.component.ts
parentc186a67f90203af6bfa434f026efdc99193bcd65 (diff)
downloadPeerTube-1378c0d343028f3d40d7d795422684ab9e6a1599.tar.gz
PeerTube-1378c0d343028f3d40d7d795422684ab9e6a1599.tar.zst
PeerTube-1378c0d343028f3d40d7d795422684ab9e6a1599.zip
Fix client lint
Diffstat (limited to 'client/src/app/shared/shared-user-settings/user-interface-settings.component.ts')
-rw-r--r--client/src/app/shared/shared-user-settings/user-interface-settings.component.ts27
1 files changed, 15 insertions, 12 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}