사용자 검색 > 프로필 > 1:1대화 클릭 >> 모든 팝업을 닫아주는 기능 추가.
This commit is contained in:
parent
f54a26fb9e
commit
de0a6b016e
|
@ -61,7 +61,9 @@ export interface ProfileDialogData {
|
|||
openProfileOptions?: OpenProfileOptions;
|
||||
}
|
||||
|
||||
export interface ProfileDialogResult {}
|
||||
export interface ProfileDialogResult {
|
||||
closeEvent?: string;
|
||||
}
|
||||
|
||||
@Component({
|
||||
selector: 'app-profile.dialog',
|
||||
|
@ -191,7 +193,7 @@ export class ProfileDialogComponent implements OnInit, OnDestroy {
|
|||
this.store.dispatch(ChatStore.openRoom({ userSeqList: [userInfo.seq] }));
|
||||
}
|
||||
|
||||
this.dialogRef.close();
|
||||
this.dialogRef.close({ closeEvent: 'CHAT' });
|
||||
}
|
||||
|
||||
onClickSendMessage(userInfo: UserInfoSS) {
|
||||
|
|
|
@ -188,9 +188,9 @@ export class IntegratedSearchDialogComponent implements OnInit, OnDestroy {
|
|||
})
|
||||
.pipe(
|
||||
take(1),
|
||||
map(res => {
|
||||
map(async res => {
|
||||
if (!!res && !!res.userInfo) {
|
||||
this.dialogService.open<
|
||||
const result = await this.dialogService.open<
|
||||
ProfileDialogComponent,
|
||||
ProfileDialogData,
|
||||
ProfileDialogResult
|
||||
|
@ -199,6 +199,12 @@ export class IntegratedSearchDialogComponent implements OnInit, OnDestroy {
|
|||
userInfo: res.userInfo
|
||||
}
|
||||
});
|
||||
|
||||
if (!!result) {
|
||||
if (!!result.closeEvent && result.closeEvent === 'CHAT') {
|
||||
this.dialogRef.close({});
|
||||
}
|
||||
}
|
||||
}
|
||||
})
|
||||
)
|
||||
|
|
Loading…
Reference in New Issue
Block a user