From 52d9f792b3fee5acce80f948295b59e3ad2073eb Mon Sep 17 00:00:00 2001 From: Chocobozzz Date: Fri, 29 Jun 2018 14:34:04 +0200 Subject: Client: Add ability to update video channel avatar --- client/src/app/shared/actor/actor.model.ts | 10 ++++++++++ 1 file changed, 10 insertions(+) (limited to 'client/src/app/shared/actor') 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 { this.updatedAt = new Date(hash.updatedAt.toString()) this.avatar = hash.avatar + this.updateComputedAttributes() + } + + updateAvatar (newAvatar: Avatar) { + this.avatar = newAvatar + + this.updateComputedAttributes() + } + + private updateComputedAttributes () { this.avatarUrl = Actor.GET_ACTOR_AVATAR_URL(this) } } -- cgit v1.2.3