diff options
author | Chocobozzz <me@florianbigard.com> | 2018-06-29 14:34:04 +0200 |
---|---|---|
committer | Chocobozzz <me@florianbigard.com> | 2018-06-29 14:34:04 +0200 |
commit | 52d9f792b3fee5acce80f948295b59e3ad2073eb (patch) | |
tree | 661f577e9c7196d199b4b49e475ecd2d88e6d7b7 /client/src/app/shared/actor | |
parent | 4bbfc6c606c8d3794bae25c64c516120af41f4eb (diff) | |
download | PeerTube-52d9f792b3fee5acce80f948295b59e3ad2073eb.tar.gz PeerTube-52d9f792b3fee5acce80f948295b59e3ad2073eb.tar.zst PeerTube-52d9f792b3fee5acce80f948295b59e3ad2073eb.zip |
Client: Add ability to update video channel avatar
Diffstat (limited to 'client/src/app/shared/actor')
-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 | } |