]> git.immae.eu Git - github/Chocobozzz/PeerTube.git/blobdiff - client/src/app/shared/actor/actor.model.ts
Prepare Dislike/Flag/View fixes
[github/Chocobozzz/PeerTube.git] / client / src / app / shared / actor / actor.model.ts
index f820dc3c48e4f62fd614b4ff22eebc288e3b9fb4..811afb4497a38dcf006522a29d5c086551cd38bf 100644 (file)
@@ -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)
   }
 }