This commit is contained in:
richard-loafle 2020-02-05 17:57:23 +09:00
commit 2cf189a5ae
2 changed files with 49 additions and 28 deletions

View File

@ -574,26 +574,29 @@ export class AppNotificationService {
); );
if (noti.userSeqs.indexOf(loginResInfo.userSeq) >= 0) { if (noti.userSeqs.indexOf(loginResInfo.userSeq) >= 0) {
// 강퇴 대상이 본인이면 열려 있는 대화방을 닫고, 대화리스트에서 삭제.
this.store.dispatch( this.store.dispatch(
RoomStore.exitForcingNotification({ RoomStore.exitForcingNotification({
noti noti
}) })
); );
} else {
// ROOM::열려 있는 대화방에서 강퇴 인원의 isJoinRoom = false 로 변경.
this.store.dispatch(
RoomStore.exitNotificationOthers({
roomSeq: noti.roomSeq,
trgtUser: noti.userSeqs
})
);
// SYNC::대화리스트의 대화자정보에서 강퇴 인원의 isJoinRoom = false 로 변경.
this.store.dispatch(
SyncStore.clearRoomUsers({
roomSeq: noti.roomSeq,
userSeqs: noti.userSeqs
})
);
} }
this.store.dispatch(
RoomStore.exitNotificationOthers({
roomSeq: noti.roomSeq,
trgtUser: noti.userSeqs
})
);
this.store.dispatch(
SyncStore.clearRoomUsers({
roomSeq: noti.roomSeq,
userSeqs: noti.userSeqs
})
);
} }
break; break;
case SSVC_TYPE_ROOM_FONT_UPD_NOTI: case SSVC_TYPE_ROOM_FONT_UPD_NOTI:

View File

@ -53,7 +53,8 @@ import {
delBuddyAndClear, delBuddyAndClear,
moveGroupMember, moveGroupMember,
moveGroupFromFailure, moveGroupFromFailure,
moveGroupToFailure moveGroupToFailure,
clearRoomUsers
} from './actions'; } from './actions';
import { SessionStorageService } from '@ucap-webmessenger/web-storage'; import { SessionStorageService } from '@ucap-webmessenger/web-storage';
import { LoginInfo, KEY_LOGIN_INFO } from '@app/types'; import { LoginInfo, KEY_LOGIN_INFO } from '@app/types';
@ -598,22 +599,37 @@ export class Effects {
) )
), ),
tap(([action, roomInfo, roomSyncDate]) => { tap(([action, roomInfo, roomSyncDate]) => {
if (!!roomInfo && roomInfo.roomSeq === action.res.roomSeq) { // ROOM::열려 있는 대화방에서 강퇴 인원의 isJoinRoom = false 로 변경.
this.store.dispatch(
ChatStore.selectedRoom({ roomSeq: action.res.roomSeq })
);
}
const loginInfo = this.sessionStorageService.get<LoginInfo>(
KEY_LOGIN_INFO
);
this.store.dispatch( this.store.dispatch(
room({ RoomStore.exitNotificationOthers({
syncDate: roomSyncDate, roomSeq: action.res.roomSeq,
localeCode: loginInfo.localeCode trgtUser: action.res.userSeqs
}) })
); );
// SYNC::대화리스트의 대화자정보에서 강퇴 인원의 isJoinRoom = false 로 변경.
this.store.dispatch(
clearRoomUsers({
roomSeq: action.res.roomSeq,
userSeqs: action.res.userSeqs
})
);
// if (!!roomInfo && roomInfo.roomSeq === action.res.roomSeq) {
// this.store.dispatch(
// ChatStore.selectedRoom({ roomSeq: action.res.roomSeq })
// );
// }
// const loginInfo = this.sessionStorageService.get<LoginInfo>(
// KEY_LOGIN_INFO
// );
// this.store.dispatch(
// room({
// syncDate: roomSyncDate,
// localeCode: loginInfo.localeCode
// })
// );
}) })
); );
}, },
@ -631,9 +647,11 @@ export class Effects {
), ),
tap(([action, roomInfo]) => { tap(([action, roomInfo]) => {
if (!!roomInfo && roomInfo.roomSeq === action.noti.roomSeq) { if (!!roomInfo && roomInfo.roomSeq === action.noti.roomSeq) {
// 열려 있는 대화방을 닫음.
this.store.dispatch(ChatStore.clearSelectedRoom()); this.store.dispatch(ChatStore.clearSelectedRoom());
} }
// sync.roomList 에서 방 삭제.
this.store.dispatch( this.store.dispatch(
RoomStore.exitSuccess({ RoomStore.exitSuccess({
res: { res: {