+ private buildAlt () {
+ if (this.isAccount()) this.alt = $localize`Account avatar`
+ else if (this.isChannel()) this.alt = $localize`Channel avatar`
+ else this.alt = ''
+ }
+
+ private buildDefaultAvatarUrl () {
+ this.defaultAvatarUrl = this.isChannel()
+ ? VideoChannel.GET_DEFAULT_AVATAR_URL(this.getSizeNumber())
+ : Account.GET_DEFAULT_AVATAR_URL(this.getSizeNumber())
+ }
+
+ private buildAvatarUrl () {
+ if (!this.actor) {
+ this.avatarUrl = ''
+ return
+ }
+
+ if (this.isAccount()) {
+ this.avatarUrl = Account.GET_ACTOR_AVATAR_URL(this.actor, this.getSizeNumber())
+ return
+ }
+
+ if (this.isChannel()) {
+ this.avatarUrl = VideoChannel.GET_ACTOR_AVATAR_URL(this.actor, this.getSizeNumber())
+ return
+ }
+
+ this.avatarUrl = ''
+ }
+