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

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;
case SSVC_TYPE_ROOM_EXIT_RES:
case SSVC_TYPE_ROOM_EXIT_NOTI:
{
const noti = notiOrRes as ExitNotification;

View File

@ -316,8 +316,24 @@ export class Effects {
() => {
return this.actions$.pipe(
ofType(exitNotification),
map(action => action.noti),
tap(noti => {})
withLatestFrom(
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 }

View File

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