sync 오전
This commit is contained in:
parent
fa0b17afef
commit
b8d60005f0
|
@ -1,4 +1,6 @@
|
|||
uncaught (in promise) error could not instantiate productregistryimpl.registry
|
||||
|
||||
list-item.component
|
||||
refreshItem() 호출
|
||||
refreshItem() 호출
|
||||
|
||||
|
BIN
documents/업무/4월/3째주/next-ucap-messenger-lf-2020-0413-1250.zip
Normal file
BIN
documents/업무/4월/3째주/next-ucap-messenger-lf-2020-0413-1250.zip
Normal file
Binary file not shown.
129
documents/업무/4월/3째주/sync-effect.ts
Normal file
129
documents/업무/4월/3째주/sync-effect.ts
Normal file
|
@ -0,0 +1,129 @@
|
|||
updateProfileImageNoti$ = createEffect(
|
||||
() =>
|
||||
this.actions$.pipe(
|
||||
ofType(updateProfileImageNoti),
|
||||
withLatestFrom(
|
||||
this.store.pipe(
|
||||
select(
|
||||
(state: any) =>
|
||||
state.messenger.sync.room.entities as Dictionary<RoomInfo>
|
||||
)
|
||||
),
|
||||
this.store.pipe(
|
||||
select(
|
||||
(state: any) =>
|
||||
state.messenger.sync.roomUserShort.entities as Dictionary<
|
||||
RoomUserData
|
||||
>
|
||||
)
|
||||
)
|
||||
// this.store.pipe(
|
||||
// select(
|
||||
// (state: any) => state.messenger.sync.buddy2.syncDate as string
|
||||
// )
|
||||
// ),
|
||||
// this.store.pipe(
|
||||
// select(
|
||||
// (state: any) => state.messenger.sync.group2.syncDate as string
|
||||
// )
|
||||
// ),
|
||||
// this.store.pipe(
|
||||
// select((state: any) => state.messenger.sync.room.syncDate as string)
|
||||
// )
|
||||
// tap(async ([action, buddy2SyncDate, group2SyncDate, roomSyncDate]) => {
|
||||
),
|
||||
tap(async ([action, roomInfos, roomUserShorts]) => {
|
||||
const userNoti = action.noti as UserNotification;
|
||||
|
||||
// const loginInfo = this.sessionStorageService.get<LoginInfo>(
|
||||
// KEY_LOGIN_INFO
|
||||
// );
|
||||
|
||||
// this.store.dispatch(buddy2({ syncDate: buddy2SyncDate }));
|
||||
// this.store.dispatch(group2({ syncDate: group2SyncDate }));
|
||||
// this.store.dispatch(
|
||||
// room({
|
||||
// syncDate: roomSyncDate,
|
||||
// localeCode: loginInfo.localeCode
|
||||
// })
|
||||
// );
|
||||
|
||||
this.store.dispatch(
|
||||
updateBuddyProfile({
|
||||
noti: userNoti
|
||||
})
|
||||
);
|
||||
|
||||
for (const key in roomUserShorts) {
|
||||
if (key === undefined) {
|
||||
continue;
|
||||
}
|
||||
if (roomUserShorts.hasOwnProperty(key)) {
|
||||
const element = roomUserShorts[key];
|
||||
const tmpRoomInfo = roomInfos[key];
|
||||
|
||||
if (
|
||||
tmpRoomInfo.roomType === RoomType.Single ||
|
||||
tmpRoomInfo.roomType === RoomType.Allim_Lbot
|
||||
) {
|
||||
const findUser = element.userInfos.filter(
|
||||
(u) => u.seq === userNoti.SENDER_SEQ
|
||||
)[0];
|
||||
|
||||
if (!!findUser && !!findUser.seq) {
|
||||
const tmpUserInfos: UserInfoShort[] = [];
|
||||
element.userInfos.map((u) => {
|
||||
let user: UserInfoShort;
|
||||
|
||||
if (!!u && u.seq === userNoti.SENDER_SEQ) {
|
||||
user = {
|
||||
...u,
|
||||
profileImageFile: userNoti.info
|
||||
};
|
||||
} else {
|
||||
user = u;
|
||||
}
|
||||
tmpUserInfos.push(user);
|
||||
});
|
||||
const roomData = {
|
||||
roomSeq: roomInfos[key].roomSeq,
|
||||
userInfos: tmpUserInfos
|
||||
} as RoomUserData;
|
||||
|
||||
this.store.dispatch(
|
||||
updateRoomUserShortProfile({
|
||||
roomData,
|
||||
noti: userNoti
|
||||
})
|
||||
);
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
})
|
||||
),
|
||||
{ dispatch: false }
|
||||
);
|
||||
|
||||
|
||||
|
||||
|
||||
// updateProfileImageNoti$ = createEffect(() =>
|
||||
// this.actions$.pipe(
|
||||
// ofType(updateProfileImageNoti),
|
||||
// withLatestFrom(
|
||||
// this.store.pipe(
|
||||
// select(
|
||||
// (state: any) =>
|
||||
// state.messenger.sync.roomUserShort.entities as Dictionary<
|
||||
// RoomUserData
|
||||
// >
|
||||
// )
|
||||
// )
|
||||
// ),
|
||||
// tap(async ([action, roomUserShorts]) => {
|
||||
// const userNoti = action.noti as UserNotification;
|
||||
// })
|
||||
// )
|
||||
// );
|
Loading…
Reference in New Issue
Block a user