diff options
Diffstat (limited to 'client/src/app/shared/shared-main/account/actor.model.ts')
-rw-r--r-- | client/src/app/shared/shared-main/account/actor.model.ts | 18 |
1 files changed, 0 insertions, 18 deletions
diff --git a/client/src/app/shared/shared-main/account/actor.model.ts b/client/src/app/shared/shared-main/account/actor.model.ts index 950e256ff..8222c9769 100644 --- a/client/src/app/shared/shared-main/account/actor.model.ts +++ b/client/src/app/shared/shared-main/account/actor.model.ts | |||
@@ -24,12 +24,6 @@ export abstract class Actor implements ActorServer { | |||
24 | 24 | ||
25 | return absoluteAPIUrl + actor.avatar.path | 25 | return absoluteAPIUrl + actor.avatar.path |
26 | } | 26 | } |
27 | |||
28 | return this.GET_DEFAULT_AVATAR_URL() | ||
29 | } | ||
30 | |||
31 | static GET_DEFAULT_AVATAR_URL () { | ||
32 | return window.location.origin + '/client/assets/images/default-avatar.png' | ||
33 | } | 27 | } |
34 | 28 | ||
35 | static CREATE_BY_STRING (accountName: string, host: string, forceHostname = false) { | 29 | static CREATE_BY_STRING (accountName: string, host: string, forceHostname = false) { |
@@ -61,17 +55,5 @@ export abstract class Actor implements ActorServer { | |||
61 | 55 | ||
62 | this.avatar = hash.avatar | 56 | this.avatar = hash.avatar |
63 | this.isLocal = Actor.IS_LOCAL(this.host) | 57 | this.isLocal = Actor.IS_LOCAL(this.host) |
64 | |||
65 | this.updateComputedAttributes() | ||
66 | } | ||
67 | |||
68 | updateAvatar (newAvatar: Avatar) { | ||
69 | this.avatar = newAvatar | ||
70 | |||
71 | this.updateComputedAttributes() | ||
72 | } | ||
73 | |||
74 | private updateComputedAttributes () { | ||
75 | this.avatarUrl = Actor.GET_ACTOR_AVATAR_URL(this) | ||
76 | } | 58 | } |
77 | } | 59 | } |