diff options
Diffstat (limited to 'client/src/app/shared')
-rw-r--r-- | client/src/app/shared/users/user.model.ts | 7 |
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 { | |||
9 | import { NSFWPolicyType } from '../../../../../shared/models/videos/nsfw-policy.type' | 9 | import { NSFWPolicyType } from '../../../../../shared/models/videos/nsfw-policy.type' |
10 | import { Actor } from '@app/shared/actor/actor.model' | 10 | import { Actor } from '@app/shared/actor/actor.model' |
11 | import { Account } from '@app/shared/account/account.model' | 11 | import { Account } from '@app/shared/account/account.model' |
12 | import { Avatar } from '../../../../../shared/models/avatars/avatar.model' | ||
12 | 13 | ||
13 | export type UserConstructorHash = { | 14 | export 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 | } |