From 16fb6e3d9d36e6246d59f34550ebe14e7a97bcc5 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Adina=20=C8=9Aeudan?= Date: Fri, 9 Apr 2021 00:05:10 +0300 Subject: [PATCH] Fixed initials avatar --- .../initials-avatar/initials-avatar.component.ts | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/apps/red-ui/src/app/modules/shared/components/initials-avatar/initials-avatar.component.ts b/apps/red-ui/src/app/modules/shared/components/initials-avatar/initials-avatar.component.ts index 58bbfad9f..0611f623b 100644 --- a/apps/red-ui/src/app/modules/shared/components/initials-avatar/initials-avatar.component.ts +++ b/apps/red-ui/src/app/modules/shared/components/initials-avatar/initials-avatar.component.ts @@ -35,9 +35,10 @@ export class InitialsAvatarComponent implements OnInit, OnChanges { } else { this.user = this._userService.getUserById(this.userId); } - this.displayName = - this._userService.getName(this.user) + - (this.showYou && this._userService.userId === this.userId ? ` (${this._translateService.instant('initials-avatar.you')})` : ''); + this.displayName = this._userService.getName(this.user); + if (this.showYou && this._userService.userId === this.userId) { + this.displayName += ` (${this._translateService.instant('initials-avatar.you')})`; + } this.initials = this._getInitials(); this.colorClass = this._colorClass; } else {