From a14148389bde1fe9bbfebfffc3b9e5f0d06e97de Mon Sep 17 00:00:00 2001 From: richard-loafle <44828666+richard-loafle@users.noreply.github.com> Date: Wed, 5 Feb 2020 11:38:51 +0900 Subject: [PATCH] bug fixed --- .../src/lib/components/list-item.component.ts | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) diff --git a/projects/ucap-webmessenger-ui-room/src/lib/components/list-item.component.ts b/projects/ucap-webmessenger-ui-room/src/lib/components/list-item.component.ts index 3b4a72a4..6d6d11ac 100644 --- a/projects/ucap-webmessenger-ui-room/src/lib/components/list-item.component.ts +++ b/projects/ucap-webmessenger-ui-room/src/lib/components/list-item.component.ts @@ -5,7 +5,8 @@ import { Output, EventEmitter, ViewChildren, - ChangeDetectorRef + ChangeDetectorRef, + ChangeDetectionStrategy } from '@angular/core'; import { RoomInfo, @@ -18,7 +19,7 @@ import { VersionInfo2Response } from '@ucap-webmessenger/api-public'; import { LoginResponse } from '@ucap-webmessenger/protocol-authentication'; import { TranslatePipe } from 'projects/ucap-webmessenger-ui/src/lib/pipes/translate.pipe'; import { - TranslateService as uiTranslateService, + TranslateService as UcapUiTranslateService, StringUtil } from '@ucap-webmessenger/ui'; import { TranslateService } from '@ngx-translate/core'; @@ -27,7 +28,8 @@ import { EventType } from '@ucap-webmessenger/protocol-event'; @Component({ selector: 'ucap-room-list-item', templateUrl: './list-item.component.html', - styleUrls: ['./list-item.component.scss'] + styleUrls: ['./list-item.component.scss'], + changeDetection: ChangeDetectionStrategy.OnPush }) export class ListItemComponent implements OnInit { @Input() @@ -58,7 +60,7 @@ export class ListItemComponent implements OnInit { constructor( private logger: NGXLogger, - private uiTranslateService: uiTranslateService, + private ucapUiTranslateService: UcapUiTranslateService, private translateService: TranslateService, private changeDetectorRef: ChangeDetectorRef ) {} @@ -125,7 +127,7 @@ export class ListItemComponent implements OnInit { getRoomNameByRoomUser(roomUserInfos: (RoomUserInfo | UserInfoShort)[]) { let roomName = new TranslatePipe( - this.uiTranslateService, + this.ucapUiTranslateService, this.changeDetectorRef ).transform(roomUserInfos, 'name', ',');