From 0c237b19fdf9c614293c1442f0ab95a81ce05735 Mon Sep 17 00:00:00 2001 From: Chocobozzz Date: Fri, 22 Jun 2018 15:42:55 +0200 Subject: Fix images size limit --- client/src/app/shared/users/user.model.ts | 7 +++++++ 1 file changed, 7 insertions(+) (limited to 'client/src/app/shared/users/user.model.ts') diff --git a/client/src/app/shared/users/user.model.ts b/client/src/app/shared/users/user.model.ts index b4be2270f..60a0f26df 100644 --- a/client/src/app/shared/users/user.model.ts +++ b/client/src/app/shared/users/user.model.ts @@ -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) } -- cgit v1.2.3