From c7a79425efd72bd93458f93c64cbc00c8618e0fe Mon Sep 17 00:00:00 2001 From: leejh Date: Wed, 16 Oct 2019 10:22:05 +0900 Subject: [PATCH] =?UTF-8?q?=EC=88=98=EC=A0=95=20::=20=EB=8C=80=ED=99=94=20?= =?UTF-8?q?>=20=EB=A6=AC=EC=8A=A4=ED=8A=B8=20::=20finalEventMessage=20?= =?UTF-8?q?=EC=9D=98=20=EC=B2=98=EB=A6=AC=20=EC=88=98=EC=A0=95.=20JSON=20>?= =?UTF-8?q?=20text?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../src/lib/components/list-item.component.ts | 52 +------------------ 1 file changed, 2 insertions(+), 50 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 c98acf73..8f14e451 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 @@ -8,11 +8,7 @@ import { import { NGXLogger } from 'ngx-logger'; import { VersionInfo2Response } from '@ucap-webmessenger/api-public'; import { EventType } from '@ucap-webmessenger/protocol-event'; -import { - FileInfo, - StickerInfo, - MassTextInfo -} from '@ucap-webmessenger/ui-chat'; +import { FileInfo, StickerInfo } from '@ucap-webmessenger/ui-chat'; import { FileType } from '@ucap-webmessenger/protocol-file'; @Component({ @@ -36,51 +32,7 @@ export class ListItemComponent implements OnInit { if (this.roomInfo.isTimeRoom) { this.finalEventMessage = '비밀 대화방입니다.'; } else { - try { - switch (this.roomInfo.finalEventType) { - case EventType.File: - { - let msg = 'Attach File'; - const contentJson: FileInfo = JSON.parse( - this.roomInfo.finalEventMessage - ); - if (contentJson.FileType === FileType.File) { - msg = '첨부파일'; - } else if (contentJson.FileType === FileType.Image) { - msg = '이미지'; - } else if (contentJson.FileType === FileType.Video) { - msg = '동영상'; - } - this.finalEventMessage = msg; - } - break; - case EventType.Sticker: - { - let msg = '스티커'; - const contentJson: StickerInfo = JSON.parse( - this.roomInfo.finalEventMessage - ); - if (contentJson.chat) { - msg += ' ' + contentJson.chat; - } - this.finalEventMessage = msg; - } - break; - case EventType.MassText: - { - const contentJson: MassTextInfo = JSON.parse( - this.roomInfo.finalEventMessage - ); - this.finalEventMessage = contentJson.Content; - } - break; - default: - this.finalEventMessage = this.roomInfo.finalEventMessage; - } - } catch (e) { - this.logger.error(e); - this.finalEventMessage = this.roomInfo.finalEventMessage; - } + this.finalEventMessage = this.roomInfo.finalEventMessage; } }