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: [] };