aboutsummaryrefslogtreecommitdiffhomepage
path: root/client/src/app/+manage
diff options
context:
space:
mode:
authorChocobozzz <me@florianbigard.com>2023-03-06 11:39:23 +0100
committerChocobozzz <me@florianbigard.com>2023-03-07 10:18:32 +0100
commit9e401fde36bdcb4b5e8dc54262c01f1e660d81a8 (patch)
treea2a3c115254370048c6dc0178c7ac91b977a3f2d /client/src/app/+manage
parent464e4ed92c119c8f5d8ae561ad1d27a90d2581a0 (diff)
downloadPeerTube-9e401fde36bdcb4b5e8dc54262c01f1e660d81a8.tar.gz
PeerTube-9e401fde36bdcb4b5e8dc54262c01f1e660d81a8.tar.zst
PeerTube-9e401fde36bdcb4b5e8dc54262c01f1e660d81a8.zip
Refactor my actor avatar edit
Diffstat (limited to 'client/src/app/+manage')
-rw-r--r--client/src/app/+manage/video-channel-edit/video-channel-update.component.ts7
1 files changed, 7 insertions, 0 deletions
diff --git a/client/src/app/+manage/video-channel-edit/video-channel-update.component.ts b/client/src/app/+manage/video-channel-edit/video-channel-update.component.ts
index 32f6d650d..3326a1505 100644
--- a/client/src/app/+manage/video-channel-edit/video-channel-update.component.ts
+++ b/client/src/app/+manage/video-channel-edit/video-channel-update.component.ts
@@ -13,6 +13,7 @@ import { FormReactiveService } from '@app/shared/shared-forms'
13import { VideoChannel, VideoChannelService } from '@app/shared/shared-main' 13import { VideoChannel, VideoChannelService } from '@app/shared/shared-main'
14import { HTMLServerConfig, VideoChannelUpdate } from '@shared/models' 14import { HTMLServerConfig, VideoChannelUpdate } from '@shared/models'
15import { VideoChannelEdit } from './video-channel-edit' 15import { VideoChannelEdit } from './video-channel-edit'
16import { shallowCopy } from '@shared/core-utils'
16 17
17@Component({ 18@Component({
18 selector: 'my-video-channel-update', 19 selector: 'my-video-channel-update',
@@ -118,6 +119,9 @@ export class VideoChannelUpdateComponent extends VideoChannelEdit implements OnI
118 this.notifier.success($localize`Avatar changed.`) 119 this.notifier.success($localize`Avatar changed.`)
119 120
120 this.videoChannel.updateAvatar(data.avatars) 121 this.videoChannel.updateAvatar(data.avatars)
122
123 // So my-actor-avatar component detects changes
124 this.videoChannel = shallowCopy(this.videoChannel)
121 }, 125 },
122 126
123 error: (err: HttpErrorResponse) => genericUploadErrorHandler({ 127 error: (err: HttpErrorResponse) => genericUploadErrorHandler({
@@ -135,6 +139,9 @@ export class VideoChannelUpdateComponent extends VideoChannelEdit implements OnI
135 this.notifier.success($localize`Avatar deleted.`) 139 this.notifier.success($localize`Avatar deleted.`)
136 140
137 this.videoChannel.resetAvatar() 141 this.videoChannel.resetAvatar()
142
143 // So my-actor-avatar component detects changes
144 this.videoChannel = shallowCopy(this.videoChannel)
138 }, 145 },
139 146
140 error: err => this.notifier.error(err.message) 147 error: err => this.notifier.error(err.message)