상대방이 퇴장 했을때 sync 쪽 user list 갱신하면서 room 에 joincount 갱신하도록 수정.
This commit is contained in:
parent
b7483d2f12
commit
9fea3a1f22
|
@ -103,6 +103,8 @@ export const reducer = createReducer(
|
|||
}),
|
||||
|
||||
on(clearRoomUsers, (state, action) => {
|
||||
const roomInfo = state.room.entities[action.roomSeq];
|
||||
|
||||
const roomUserList: RoomUserDetailData = {
|
||||
...state.roomUser.entities[action.roomSeq]
|
||||
};
|
||||
|
@ -149,6 +151,15 @@ export const reducer = createReducer(
|
|||
|
||||
return {
|
||||
...state,
|
||||
room: adapterRoom.upsertOne(
|
||||
{
|
||||
...roomInfo,
|
||||
joinUserCount: roomInfo.joinUserCount - action.userSeqs.length
|
||||
},
|
||||
{
|
||||
...state.room
|
||||
}
|
||||
),
|
||||
roomUser: !!trgtRoomUserList
|
||||
? adapterRoomUser.upsertOne(trgtRoomUserList, {
|
||||
...state.roomUser
|
||||
|
|
Loading…
Reference in New Issue
Block a user