방 나가기 모바일 씽크 작업.

This commit is contained in:
leejinho 2019-12-09 16:25:08 +09:00
parent 5c05a04cca
commit 39aaa78e4e
3 changed files with 20 additions and 2 deletions

View File

@ -378,6 +378,7 @@ export class AppNotificationService {
); );
} }
break; break;
case SSVC_TYPE_ROOM_EXIT_RES:
case SSVC_TYPE_ROOM_EXIT_NOTI: case SSVC_TYPE_ROOM_EXIT_NOTI:
{ {
const noti = notiOrRes as ExitNotification; const noti = notiOrRes as ExitNotification;

View File

@ -316,8 +316,24 @@ export class Effects {
() => { () => {
return this.actions$.pipe( return this.actions$.pipe(
ofType(exitNotification), ofType(exitNotification),
map(action => action.noti), withLatestFrom(
tap(noti => {}) this.store.pipe(
select((state: any) => state.messenger.room.roomInfo as RoomInfo)
)
),
tap(([action, roomInfo]) => {
if (!!roomInfo && roomInfo.roomSeq === action.noti.roomSeq) {
this.store.dispatch(ChatStore.clearSelectedRoom());
}
this.store.dispatch(
exitSuccess({
res: {
roomSeq: action.noti.roomSeq
}
})
);
})
); );
}, },
{ dispatch: false } { dispatch: false }

View File

@ -145,6 +145,7 @@ export class RoomProtocolService {
); );
} }
break; break;
case SSVC_TYPE_ROOM_EXIT_RES:
case SSVC_TYPE_ROOM_EXIT_NOTI: case SSVC_TYPE_ROOM_EXIT_NOTI:
{ {
this.notificationSubject.next(decodeExitNotification(message)); this.notificationSubject.next(decodeExitNotification(message));