]> git.immae.eu Git - github/Chocobozzz/PeerTube.git/blobdiff - client/src/app/shared/users/user.model.ts
Fix images size limit
[github/Chocobozzz/PeerTube.git] / client / src / app / shared / users / user.model.ts
index b4be2270f8c82818db140ed7a3731d9f752f2388..60a0f26dfff38db930d7ddc03797e4451de055e4 100644 (file)
@@ -9,6 +9,7 @@ import {
 import { NSFWPolicyType } from '../../../../../shared/models/videos/nsfw-policy.type'
 import { Actor } from '@app/shared/actor/actor.model'
 import { Account } from '@app/shared/account/account.model'
+import { Avatar } from '../../../../../shared/models/avatars/avatar.model'
 
 export type UserConstructorHash = {
   id: number,
@@ -84,6 +85,12 @@ export class User implements UserServerModel {
     this.updateComputedAttributes()
   }
 
+  updateAccountAvatar (newAccountAvatar: Avatar) {
+    this.account.avatar = newAccountAvatar
+
+    this.updateComputedAttributes()
+  }
+
   private updateComputedAttributes () {
     this.accountAvatarUrl = Actor.GET_ACTOR_AVATAR_URL(this.account)
   }