From 92ab91ef09ff323e779fd46f606a5e9934bdf1ce Mon Sep 17 00:00:00 2001 From: leejinho Date: Tue, 7 Jan 2020 13:45:11 +0900 Subject: [PATCH] =?UTF-8?q?#=20=EC=9D=B4=EC=8A=88=EC=B2=98=EB=A6=AC=2086?= =?UTF-8?q?=20=EB=8C=80=ED=99=94=EB=B0=A9=20=EA=B2=80=EC=83=89=20=ED=9B=84?= =?UTF-8?q?=20=EC=9A=B0=ED=81=B4=EB=A6=AD=20=EB=A9=94=EB=89=B4=20=EC=84=A0?= =?UTF-8?q?=ED=83=9D=20=EC=8B=9C=20=EA=B2=80=EC=83=89=20=ED=95=84=ED=84=B0?= =?UTF-8?q?=20=ED=92=80=EB=A0=A4=EC=A7=90=2096=20=EB=8C=80=ED=99=94?= =?UTF-8?q?=EB=B0=A9=20=EA=B2=80=EC=83=89=20=ED=95=84=ED=84=B0=20=ED=9B=84?= =?UTF-8?q?=20=EB=A9=94=EC=8B=9C=EC=A7=80=20=EC=88=98=EC=8B=A0=EC=8B=9C=20?= =?UTF-8?q?=EA=B2=80=EC=83=89=ED=95=84=ED=84=B0=20=ED=92=80=EB=A0=A4?= =?UTF-8?q?=EC=A7=90=20::=2086=EA=B3=BC=20=EB=8F=99=EC=9D=BC=20=EA=B1=B4?= =?UTF-8?q?=EC=9C=BC=EB=A1=9C=20=ED=94=84=EB=A1=9C=EA=B7=B8=EB=9E=A8=20?= =?UTF-8?q?=EA=B0=9C=EC=84=A0=20=ED=9B=84=20=EC=A0=95=EC=83=81=EB=8F=99?= =?UTF-8?q?=EC=9E=91.?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 112 즐겨찾기 그룹 쪽지 보내기 동작 되지 않음 :: 즐겨찾기 그룹에 대한 더보기 메뉴 핸들링 및 쪽지 보내기 버그 처리 완료. 114 트레이에서 로그아웃 선택 시 팝업 오류 :: ngZone.run 으로 처리함. --- .../components/left-sidenav/chat.component.ts | 10 ++++- .../left-sidenav/group.component.ts | 38 +++++++++++++++---- .../src/app/services/native.service.ts | 4 +- .../src/assets/i18n/ko.json | 2 +- .../components/expansion-panel.component.ts | 6 +++ 5 files changed, 49 insertions(+), 11 deletions(-) diff --git a/projects/ucap-webmessenger-app/src/app/layouts/messenger/components/left-sidenav/chat.component.ts b/projects/ucap-webmessenger-app/src/app/layouts/messenger/components/left-sidenav/chat.component.ts index 6a05c4d1..fe7cf6e3 100644 --- a/projects/ucap-webmessenger-app/src/app/layouts/messenger/components/left-sidenav/chat.component.ts +++ b/projects/ucap-webmessenger-app/src/app/layouts/messenger/components/left-sidenav/chat.component.ts @@ -128,7 +128,6 @@ export class ChatComponent implements OnInit, OnDestroy, AfterViewChecked { .pipe( tap(([room, roomUser, roomUserShort]) => { this.roomList = room; - this.searchRoomList = room; this.roomUserList = roomUser; this.roomUserShortList = roomUserShort; @@ -159,6 +158,15 @@ export class ChatComponent implements OnInit, OnDestroy, AfterViewChecked { this.recommendedWordList = [...recommendedWordList]; + if (!!this.isSearch) { + this.searchRoomList = room.filter( + roomInfo => + this.searchRoomList.filter( + sInfo => sInfo.roomSeq === roomInfo.roomSeq + ).length > 0 + ); + } + if (!!this.psDirectiveRef) { this.psDirectiveRef.update(); } 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 9d7d6b7e..4d1f5bea 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 @@ -105,6 +105,8 @@ export class GroupComponent implements OnInit, OnDestroy { groupBuddyListSubscription: Subscription; favoritBuddyList$: Observable; + favoritBuddyList: UserInfo[] = []; + companyList$: Observable; companyCode: string; @@ -229,9 +231,10 @@ export class GroupComponent implements OnInit, OnDestroy { .pipe(select(AppStore.MessengerSelector.SyncSelector.selectAllBuddy2)) .pipe( map(buddyInfoList => { - return buddyInfoList + this.favoritBuddyList = buddyInfoList .filter(buddy => buddy.isFavorit) .sort((a, b) => (a.name < b.name ? -1 : a.name > b.name ? 1 : 0)); + return this.favoritBuddyList; }) ); } @@ -371,7 +374,11 @@ export class GroupComponent implements OnInit, OnDestroy { menuType === 'EDIT_MEMBER' || menuType === 'DELETE' ) { - if (!group || group === undefined) { + if ( + !group || + group === undefined || + (group.seq < 0 && group.name === 'Favorit') + ) { return false; } @@ -395,7 +402,11 @@ export class GroupComponent implements OnInit, OnDestroy { } // 그룹원 0명인 그룹 메뉴 정리 - if (menuType === 'CHAT') { + if ( + menuType === 'CHAT' || + menuType === 'SEND_MESSAGE' || + menuType === 'DIV1' + ) { if (!!group && !!group.userSeqs && group.userSeqs.length > 0) { return true; } else { @@ -652,11 +663,22 @@ export class GroupComponent implements OnInit, OnDestroy { break; case 'SEND_MESSAGE': { - const curGroupBuddyList = this.groupBuddyList.filter( - groupInfo => groupInfo.group.seq === group.seq - ); + let receiverList: UserInfo[] = []; + const isFavGroup = + group.seq < 0 && group.name === 'Favorit' ? true : false; - if (!!curGroupBuddyList && curGroupBuddyList.length > 0) { + if (!!isFavGroup) { + receiverList = this.favoritBuddyList; + } else { + const curGroupBuddyList = this.groupBuddyList.filter( + groupInfo => groupInfo.group.seq === group.seq + ); + if (!!curGroupBuddyList && curGroupBuddyList.length > 0) { + receiverList = curGroupBuddyList[0].buddyList; + } + } + + if (receiverList.length > 0) { this.dialogService.open< MessageWriteDialogComponent, MessageWriteDialogData, @@ -669,7 +691,7 @@ export class GroupComponent implements OnInit, OnDestroy { data: { loginRes: this.loginRes, environmentsInfo: this.environmentsInfo, - receiverList: curGroupBuddyList[0].buddyList + receiverList } }); } diff --git a/projects/ucap-webmessenger-app/src/app/services/native.service.ts b/projects/ucap-webmessenger-app/src/app/services/native.service.ts index f10c25e1..03e44528 100644 --- a/projects/ucap-webmessenger-app/src/app/services/native.service.ts +++ b/projects/ucap-webmessenger-app/src/app/services/native.service.ts @@ -37,7 +37,9 @@ export class AppNativeService { subscribe(): void { this.nativeService.logout().subscribe(() => { - this.store.dispatch(AuthenticationStore.logoutConfirmation()); + this.ngZone.run(() => { + this.store.dispatch(AuthenticationStore.logoutConfirmation()); + }); }); this.nativeService.changeStatus().subscribe(statusCode => {}); this.nativeService.showSetting().subscribe(() => { diff --git a/projects/ucap-webmessenger-app/src/assets/i18n/ko.json b/projects/ucap-webmessenger-app/src/assets/i18n/ko.json index 7a40679c..3893d01e 100644 --- a/projects/ucap-webmessenger-app/src/assets/i18n/ko.json +++ b/projects/ucap-webmessenger-app/src/assets/i18n/ko.json @@ -679,7 +679,7 @@ "addMemberToRoom": "대화 상대 추가", "addMemberToGroup": "그룹 멤버로 추가", "modifyRoomMember": "대화방 멤버 편집", - "ejectFromRoom": "Eject from room", + "ejectFromRoom": "강제 퇴장", "confirmEjectFromRoom": "{{targetMember}} 님을 대화방에서 퇴장 시키겠습니까?", "badgeDescriptionForUnread": "확인하지 않은 메시지가 있습니다." }, diff --git a/projects/ucap-webmessenger-ui-group/src/lib/components/expansion-panel.component.ts b/projects/ucap-webmessenger-ui-group/src/lib/components/expansion-panel.component.ts index e4e05178..e3c010fb 100644 --- a/projects/ucap-webmessenger-ui-group/src/lib/components/expansion-panel.component.ts +++ b/projects/ucap-webmessenger-ui-group/src/lib/components/expansion-panel.component.ts @@ -85,6 +85,12 @@ export class ExpansionPanelComponent } else { const groupNode: GroupNode = { nodeType: NodeType.Favorit, + groupDetail: { + seq: -9999, + name: NodeType.Favorit, + isActive: true, + userSeqs: userInfoList.map(userInfo => userInfo.seq) + } as GroupDetailData, children: [] };