From 4b4f8a00671dec694448077cd8e9fa3c56f6dd42 Mon Sep 17 00:00:00 2001 From: leejh Date: Thu, 31 Oct 2019 15:33:56 +0900 Subject: [PATCH] bugfix MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 방나가기(Room Exit) 시에 state 에서 roominfo 만 삭제되던것 roomUserInfos 도 샂게 하도록 수정. 해당 부분이 방 재 오픈시 유저 기준 검색하는 부분에서 에러를 발생하여 조치함. --- .../src/app/store/messenger/sync/reducers.ts | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) diff --git a/projects/ucap-webmessenger-app/src/app/store/messenger/sync/reducers.ts b/projects/ucap-webmessenger-app/src/app/store/messenger/sync/reducers.ts index 6c72eca8..0b78043e 100644 --- a/projects/ucap-webmessenger-app/src/app/store/messenger/sync/reducers.ts +++ b/projects/ucap-webmessenger-app/src/app/store/messenger/sync/reducers.ts @@ -181,7 +181,16 @@ export const reducer = createReducer( on(RoomStore.exitSuccess, (state, action) => { return { ...state, - room: adapterRoom.removeOne(action.res.roomSeq, { ...state.room }) + room: adapterRoom.removeOne(action.res.roomSeq, { ...state.room }), + roomUser: adapterRoomUser.removeOne(action.res.roomSeq, { + ...state.roomUser + }), + roomUserShort: adapterRoomUserShort.removeOne(action.res.roomSeq, { + ...state.roomUserShort + }), + chatUnreadCount: + state.chatUnreadCount - + state.room.entities[action.res.roomSeq].noReadCnt }; }),