From 2c94c9f7bdd0c24b7c46d7c9ddf308fbaca686c8 Mon Sep 17 00:00:00 2001 From: leejinho Date: Wed, 26 Feb 2020 10:29:05 +0900 Subject: [PATCH] =?UTF-8?q?#=20=EC=9D=B4=EC=8A=88=EC=B2=98=EB=A6=AC=20263?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../src/app/store/messenger/room/reducers.ts | 13 +++++++++++-- 1 file changed, 11 insertions(+), 2 deletions(-) diff --git a/projects/ucap-webmessenger-app/src/app/store/messenger/room/reducers.ts b/projects/ucap-webmessenger-app/src/app/store/messenger/room/reducers.ts index 4d3842f0..bba3bec5 100644 --- a/projects/ucap-webmessenger-app/src/app/store/messenger/room/reducers.ts +++ b/projects/ucap-webmessenger-app/src/app/store/messenger/room/reducers.ts @@ -71,12 +71,21 @@ export const reducer = createReducer( }), on(updateSuccess, (state, action) => { + const curRoomInfo = state.roomInfo; + let roomName = curRoomInfo.roomName; + let receiveAlarm = curRoomInfo.receiveAlarm; + + if (curRoomInfo.roomSeq === action.res.roomSeq) { + roomName = action.res.roomName; + receiveAlarm = action.res.receiveAlarm; + } + return { ...state, roomInfo: { ...state.roomInfo, - roomName: action.res.roomName, - receiveAlarm: action.res.receiveAlarm + roomName, + receiveAlarm } }; }),