diff options
Diffstat (limited to 'client/src/app/shared/actor/actor.model.ts')
-rw-r--r-- | client/src/app/shared/actor/actor.model.ts | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/client/src/app/shared/actor/actor.model.ts b/client/src/app/shared/actor/actor.model.ts index f820dc3c4..811afb449 100644 --- a/client/src/app/shared/actor/actor.model.ts +++ b/client/src/app/shared/actor/actor.model.ts | |||
@@ -45,6 +45,16 @@ export abstract class Actor implements ActorServer { | |||
45 | this.updatedAt = new Date(hash.updatedAt.toString()) | 45 | this.updatedAt = new Date(hash.updatedAt.toString()) |
46 | this.avatar = hash.avatar | 46 | this.avatar = hash.avatar |
47 | 47 | ||
48 | this.updateComputedAttributes() | ||
49 | } | ||
50 | |||
51 | updateAvatar (newAvatar: Avatar) { | ||
52 | this.avatar = newAvatar | ||
53 | |||
54 | this.updateComputedAttributes() | ||
55 | } | ||
56 | |||
57 | private updateComputedAttributes () { | ||
48 | this.avatarUrl = Actor.GET_ACTOR_AVATAR_URL(this) | 58 | this.avatarUrl = Actor.GET_ACTOR_AVATAR_URL(this) |
49 | } | 59 | } |
50 | } | 60 | } |