aboutsummaryrefslogtreecommitdiffhomepage
path: root/client/src/app/shared/users
diff options
context:
space:
mode:
Diffstat (limited to 'client/src/app/shared/users')
-rw-r--r--client/src/app/shared/users/user.model.ts7
1 files changed, 7 insertions, 0 deletions
diff --git a/client/src/app/shared/users/user.model.ts b/client/src/app/shared/users/user.model.ts
index b4be2270f..60a0f26df 100644
--- a/client/src/app/shared/users/user.model.ts
+++ b/client/src/app/shared/users/user.model.ts
@@ -9,6 +9,7 @@ import {
9import { NSFWPolicyType } from '../../../../../shared/models/videos/nsfw-policy.type' 9import { NSFWPolicyType } from '../../../../../shared/models/videos/nsfw-policy.type'
10import { Actor } from '@app/shared/actor/actor.model' 10import { Actor } from '@app/shared/actor/actor.model'
11import { Account } from '@app/shared/account/account.model' 11import { Account } from '@app/shared/account/account.model'
12import { Avatar } from '../../../../../shared/models/avatars/avatar.model'
12 13
13export type UserConstructorHash = { 14export type UserConstructorHash = {
14 id: number, 15 id: number,
@@ -84,6 +85,12 @@ export class User implements UserServerModel {
84 this.updateComputedAttributes() 85 this.updateComputedAttributes()
85 } 86 }
86 87
88 updateAccountAvatar (newAccountAvatar: Avatar) {
89 this.account.avatar = newAccountAvatar
90
91 this.updateComputedAttributes()
92 }
93
87 private updateComputedAttributes () { 94 private updateComputedAttributes () {
88 this.accountAvatarUrl = Actor.GET_ACTOR_AVATAR_URL(this.account) 95 this.accountAvatarUrl = Actor.GET_ACTOR_AVATAR_URL(this.account)
89 } 96 }