From a4e018eef30e1357e6a48d3bb3efcf02b17f0d3a Mon Sep 17 00:00:00 2001 From: leejinho Date: Wed, 27 Nov 2019 15:30:14 +0900 Subject: [PATCH] =?UTF-8?q?#=20=EC=9D=B4=EC=8A=88=EC=B2=98=EB=A6=AC=20[53?= =?UTF-8?q?=200=EB=AA=85=20=EA=B7=B8=EB=A3=B9=20=EB=8C=80=ED=99=94?= =?UTF-8?q?=EB=B0=A9=20=EC=83=9D=EC=84=B1=EB=90=A8]=20::=200=EB=AA=85?= =?UTF-8?q?=EA=B7=B8=EB=A3=B9=EC=97=90=20=EA=B7=B8=EB=A3=B9=EB=8C=80?= =?UTF-8?q?=ED=99=94=20=EB=A9=94=EB=89=B4=20=EC=82=AD=EC=A0=9C?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../messenger/components/left-sidenav/group.component.ts | 9 +++++++++ .../src/lib/protocols/group.ts | 8 ++++++-- 2 files changed, 15 insertions(+), 2 deletions(-) diff --git a/projects/ucap-webmessenger-app/src/app/layouts/messenger/components/left-sidenav/group.component.ts b/projects/ucap-webmessenger-app/src/app/layouts/messenger/components/left-sidenav/group.component.ts index b978b51e..cbda8829 100644 --- a/projects/ucap-webmessenger-app/src/app/layouts/messenger/components/left-sidenav/group.component.ts +++ b/projects/ucap-webmessenger-app/src/app/layouts/messenger/components/left-sidenav/group.component.ts @@ -308,6 +308,15 @@ export class GroupComponent implements OnInit, OnDestroy { } } + // 그룹원 0명인 그룹 메뉴 정리 + if (menuType === 'CHAT') { + if (!!group && !!group.userSeqs && group.userSeqs.length > 0) { + return true; + } else { + return false; + } + } + return true; } diff --git a/projects/ucap-webmessenger-protocol-sync/src/lib/protocols/group.ts b/projects/ucap-webmessenger-protocol-sync/src/lib/protocols/group.ts index f1a20682..5933e8db 100644 --- a/projects/ucap-webmessenger-protocol-sync/src/lib/protocols/group.ts +++ b/projects/ucap-webmessenger-protocol-sync/src/lib/protocols/group.ts @@ -77,9 +77,13 @@ export const decodeGroupData: ProtocolDecoder = ( export const decodeGroupDetailData: ProtocolDecoder = ( message: ProtocolMessage ) => { - let userSeqs: number[] = []; + const userSeqs: number[] = []; if (message.bodyList.length > 3) { - userSeqs = message.bodyList.slice(3); + message.bodyList.slice(3).forEach(seq => { + if (seq !== 0) { + userSeqs.push(seq); + } + }); } return decodeProtocolMessage(message, { // 그룹SEQ(n)