순환참조 오류 수정.
This commit is contained in:
parent
2dcd0036d0
commit
dfde4bf491
@ -266,35 +266,6 @@ export class Effects {
|
|||||||
})
|
})
|
||||||
)
|
)
|
||||||
);
|
);
|
||||||
inviteSuccess$ = createEffect(() =>
|
|
||||||
this.actions$.pipe(
|
|
||||||
ofType(inviteSuccess),
|
|
||||||
withLatestFrom(
|
|
||||||
this.store.pipe(
|
|
||||||
select((state: any) => state.messenger.room.roomInfo as RoomInfo)
|
|
||||||
),
|
|
||||||
this.store.pipe(
|
|
||||||
select(AppStore.MessengerSelector.SyncSelector.selectRoomSyncDate)
|
|
||||||
)
|
|
||||||
),
|
|
||||||
map(([action, roomInfo, roomSyncDate]) => {
|
|
||||||
const loginInfo = this.sessionStorageService.get<LoginInfo>(
|
|
||||||
KEY_LOGIN_INFO
|
|
||||||
);
|
|
||||||
|
|
||||||
this.store.dispatch(
|
|
||||||
SyncStore.room({
|
|
||||||
syncDate: roomSyncDate,
|
|
||||||
localeCode: loginInfo.localeCode
|
|
||||||
})
|
|
||||||
);
|
|
||||||
|
|
||||||
if (!!roomInfo && roomInfo.roomSeq === action.roomSeq) {
|
|
||||||
return ChatStore.selectedRoom({ roomSeq: action.roomSeq });
|
|
||||||
}
|
|
||||||
})
|
|
||||||
)
|
|
||||||
);
|
|
||||||
|
|
||||||
exit$ = createEffect(() =>
|
exit$ = createEffect(() =>
|
||||||
this.actions$.pipe(
|
this.actions$.pipe(
|
||||||
@ -354,66 +325,6 @@ export class Effects {
|
|||||||
},
|
},
|
||||||
{ dispatch: false }
|
{ dispatch: false }
|
||||||
);
|
);
|
||||||
exitForcingNotificationRes$ = createEffect(
|
|
||||||
() => {
|
|
||||||
return this.actions$.pipe(
|
|
||||||
ofType(exitForcingNotificationRes),
|
|
||||||
withLatestFrom(
|
|
||||||
this.store.pipe(
|
|
||||||
select((state: any) => state.messenger.room.roomInfo as RoomInfo)
|
|
||||||
),
|
|
||||||
this.store.pipe(
|
|
||||||
select(AppStore.MessengerSelector.SyncSelector.selectRoomSyncDate)
|
|
||||||
)
|
|
||||||
),
|
|
||||||
tap(([action, roomInfo, roomSyncDate]) => {
|
|
||||||
if (!!roomInfo && roomInfo.roomSeq === action.noti.roomSeq) {
|
|
||||||
this.store.dispatch(
|
|
||||||
ChatStore.selectedRoom({ roomSeq: action.noti.roomSeq })
|
|
||||||
);
|
|
||||||
}
|
|
||||||
|
|
||||||
const loginInfo = this.sessionStorageService.get<LoginInfo>(
|
|
||||||
KEY_LOGIN_INFO
|
|
||||||
);
|
|
||||||
|
|
||||||
this.store.dispatch(
|
|
||||||
SyncStore.room({
|
|
||||||
syncDate: roomSyncDate,
|
|
||||||
localeCode: loginInfo.localeCode
|
|
||||||
})
|
|
||||||
);
|
|
||||||
})
|
|
||||||
);
|
|
||||||
},
|
|
||||||
{ dispatch: false }
|
|
||||||
);
|
|
||||||
exitForcingNotificationNoti$ = createEffect(
|
|
||||||
() => {
|
|
||||||
return this.actions$.pipe(
|
|
||||||
ofType(exitForcingNotificationNoti),
|
|
||||||
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 }
|
|
||||||
);
|
|
||||||
|
|
||||||
updateFontNotification$ = createEffect(
|
updateFontNotification$ = createEffect(
|
||||||
() => {
|
() => {
|
||||||
|
@ -472,6 +472,97 @@ export class Effects {
|
|||||||
{ dispatch: false }
|
{ dispatch: false }
|
||||||
);
|
);
|
||||||
|
|
||||||
|
inviteSuccess$ = createEffect(() =>
|
||||||
|
this.actions$.pipe(
|
||||||
|
ofType(RoomStore.inviteSuccess),
|
||||||
|
withLatestFrom(
|
||||||
|
this.store.pipe(
|
||||||
|
select((state: any) => state.messenger.room.roomInfo as RoomInfo)
|
||||||
|
),
|
||||||
|
this.store.pipe(
|
||||||
|
select((state: any) => state.messenger.sync.room.syncDate as string)
|
||||||
|
)
|
||||||
|
),
|
||||||
|
map(([action, roomInfo, roomSyncDate]) => {
|
||||||
|
const loginInfo = this.sessionStorageService.get<LoginInfo>(
|
||||||
|
KEY_LOGIN_INFO
|
||||||
|
);
|
||||||
|
|
||||||
|
this.store.dispatch(
|
||||||
|
room({
|
||||||
|
syncDate: roomSyncDate,
|
||||||
|
localeCode: loginInfo.localeCode
|
||||||
|
})
|
||||||
|
);
|
||||||
|
|
||||||
|
if (!!roomInfo && roomInfo.roomSeq === action.roomSeq) {
|
||||||
|
return ChatStore.selectedRoom({ roomSeq: action.roomSeq });
|
||||||
|
}
|
||||||
|
})
|
||||||
|
)
|
||||||
|
);
|
||||||
|
|
||||||
|
exitForcingNotificationRes$ = createEffect(
|
||||||
|
() => {
|
||||||
|
return this.actions$.pipe(
|
||||||
|
ofType(RoomStore.exitForcingNotificationRes),
|
||||||
|
withLatestFrom(
|
||||||
|
this.store.pipe(
|
||||||
|
select((state: any) => state.messenger.room.roomInfo as RoomInfo)
|
||||||
|
),
|
||||||
|
this.store.pipe(
|
||||||
|
select((state: any) => state.messenger.sync.room.syncDate as string)
|
||||||
|
)
|
||||||
|
),
|
||||||
|
tap(([action, roomInfo, roomSyncDate]) => {
|
||||||
|
if (!!roomInfo && roomInfo.roomSeq === action.noti.roomSeq) {
|
||||||
|
this.store.dispatch(
|
||||||
|
ChatStore.selectedRoom({ roomSeq: action.noti.roomSeq })
|
||||||
|
);
|
||||||
|
}
|
||||||
|
|
||||||
|
const loginInfo = this.sessionStorageService.get<LoginInfo>(
|
||||||
|
KEY_LOGIN_INFO
|
||||||
|
);
|
||||||
|
|
||||||
|
this.store.dispatch(
|
||||||
|
room({
|
||||||
|
syncDate: roomSyncDate,
|
||||||
|
localeCode: loginInfo.localeCode
|
||||||
|
})
|
||||||
|
);
|
||||||
|
})
|
||||||
|
);
|
||||||
|
},
|
||||||
|
{ dispatch: false }
|
||||||
|
);
|
||||||
|
exitForcingNotificationNoti$ = createEffect(
|
||||||
|
() => {
|
||||||
|
return this.actions$.pipe(
|
||||||
|
ofType(RoomStore.exitForcingNotificationNoti),
|
||||||
|
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(
|
||||||
|
RoomStore.exitSuccess({
|
||||||
|
res: {
|
||||||
|
roomSeq: action.noti.roomSeq
|
||||||
|
}
|
||||||
|
})
|
||||||
|
);
|
||||||
|
})
|
||||||
|
);
|
||||||
|
},
|
||||||
|
{ dispatch: false }
|
||||||
|
);
|
||||||
|
|
||||||
createGroup$ = createEffect(() =>
|
createGroup$ = createEffect(() =>
|
||||||
this.actions$.pipe(
|
this.actions$.pipe(
|
||||||
ofType(createGroup),
|
ofType(createGroup),
|
||||||
|
Loading…
x
Reference in New Issue
Block a user