사용자 검색 > 프로필 > 1:1대화 클릭 >> 모든 팝업을 닫아주는 기능 추가.

This commit is contained in:
leejinho 2020-01-31 09:08:39 +09:00
parent f54a26fb9e
commit de0a6b016e
2 changed files with 12 additions and 4 deletions

View File

@ -61,7 +61,9 @@ export interface ProfileDialogData {
openProfileOptions?: OpenProfileOptions; openProfileOptions?: OpenProfileOptions;
} }
export interface ProfileDialogResult {} export interface ProfileDialogResult {
closeEvent?: string;
}
@Component({ @Component({
selector: 'app-profile.dialog', selector: 'app-profile.dialog',
@ -191,7 +193,7 @@ export class ProfileDialogComponent implements OnInit, OnDestroy {
this.store.dispatch(ChatStore.openRoom({ userSeqList: [userInfo.seq] })); this.store.dispatch(ChatStore.openRoom({ userSeqList: [userInfo.seq] }));
} }
this.dialogRef.close(); this.dialogRef.close({ closeEvent: 'CHAT' });
} }
onClickSendMessage(userInfo: UserInfoSS) { onClickSendMessage(userInfo: UserInfoSS) {

View File

@ -188,9 +188,9 @@ export class IntegratedSearchDialogComponent implements OnInit, OnDestroy {
}) })
.pipe( .pipe(
take(1), take(1),
map(res => { map(async res => {
if (!!res && !!res.userInfo) { if (!!res && !!res.userInfo) {
this.dialogService.open< const result = await this.dialogService.open<
ProfileDialogComponent, ProfileDialogComponent,
ProfileDialogData, ProfileDialogData,
ProfileDialogResult ProfileDialogResult
@ -199,6 +199,12 @@ export class IntegratedSearchDialogComponent implements OnInit, OnDestroy {
userInfo: res.userInfo userInfo: res.userInfo
} }
}); });
if (!!result) {
if (!!result.closeEvent && result.closeEvent === 'CHAT') {
this.dialogRef.close({});
}
}
} }
}) })
) )