From 3eca5d2d2d4ddc9bedaf5028d2f712ed61dcd526 Mon Sep 17 00:00:00 2001 From: leejinho Date: Wed, 15 Jan 2020 17:31:34 +0900 Subject: [PATCH] =?UTF-8?q?#=20=EC=9D=B4=EC=8A=88=EC=B2=98=EB=A6=AC=20155?= =?UTF-8?q?=20=EC=95=88=EC=9D=BD=EC=9D=80=20=EB=A9=94=EC=8B=9C=EC=A7=80?= =?UTF-8?q?=EA=B0=80=20XX=EA=B0=9C=20=EB=8D=94=20=EC=9E=88=EC=8A=B5?= =?UTF-8?q?=EB=8B=88=EB=8B=A4.'=20=EB=AC=B8=EA=B5=AC=20=EC=98=A4=EB=A5=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../src/lib/components/messages.component.html | 10 +--------- .../src/lib/components/messages.component.ts | 15 ++++++++++++++- 2 files changed, 15 insertions(+), 10 deletions(-) diff --git a/projects/ucap-webmessenger-ui-chat/src/lib/components/messages.component.html b/projects/ucap-webmessenger-ui-chat/src/lib/components/messages.component.html index b21eda25..4df1ebbb 100644 --- a/projects/ucap-webmessenger-ui-chat/src/lib/components/messages.component.html +++ b/projects/ucap-webmessenger-ui-chat/src/lib/components/messages.component.html @@ -30,15 +30,7 @@ " > - - {{ - 'chat.event.moreUnreadEventsWith' - | translate - : { - countOfUnread: firstEventSeq - (roomInfo.lastReadEventSeq + 1) - } - }} - + diff --git a/projects/ucap-webmessenger-ui-chat/src/lib/components/messages.component.ts b/projects/ucap-webmessenger-ui-chat/src/lib/components/messages.component.ts index c60593dc..55d6c32e 100644 --- a/projects/ucap-webmessenger-ui-chat/src/lib/components/messages.component.ts +++ b/projects/ucap-webmessenger-ui-chat/src/lib/components/messages.component.ts @@ -16,6 +16,7 @@ import { FileInfo } from '../models/file-info.json'; import { DatePipe } from '@angular/common'; import moment from 'moment'; import { FileDownloadItem } from '@ucap-webmessenger/api'; +import { TranslateService } from '@ngx-translate/core'; @Component({ selector: 'ucap-chat-messages', @@ -91,7 +92,11 @@ export class MessagesComponent implements OnInit { firstEventSeq = 0; existReadHere = false; - constructor(private logger: NGXLogger, private datePipe: DatePipe) {} + constructor( + private logger: NGXLogger, + private datePipe: DatePipe, + private translateService: TranslateService + ) {} ngOnInit() { this.profileImageRoot = @@ -209,6 +214,14 @@ export class MessagesComponent implements OnInit { return false; } + getStringReadHereMore(): string { + let rtnStr = ''; + rtnStr = this.translateService.instant('chat.event.moreUnreadEventsWith', { + countOfUnread: this.firstEventSeq - (this.roomInfo.lastReadEventSeq + 1) + }); + return rtnStr; + } + onClickOpenProfile(userSeq: number) { this.openProfile.emit(userSeq); }