readNotification 에서의 로직 개선.

This commit is contained in:
leejinho 2020-03-11 17:00:43 +09:00
parent cc73faaaa3
commit 2f3a76a7f7

View File

@ -925,30 +925,6 @@ export class Effects {
})
);
}
}
// not opened room :: unread count increased
if (
action.SVC_TYPE === SVC_TYPE_EVENT &&
action.SSVC_TYPE === SSVC_TYPE_EVENT_SEND_RES
) {
/**
* RES noti .
* unread count .
*/
} else {
if (!roomInfo || roomInfo.roomSeq !== action.roomSeq) {
if (!!trgtRoomInfos && !!trgtRoomInfos[action.roomSeq]) {
const noReadCnt = trgtRoomInfos[action.roomSeq].noReadCnt;
this.store.dispatch(
SyncStore.updateUnreadCount({
roomSeq: action.roomSeq,
noReadCnt: noReadCnt + 1
})
);
}
}
}
if (action.info.type === EventType.File) {
// File 정보 수집.
@ -962,6 +938,28 @@ export class Effects {
})
);
}
} else {
// not opened room :: unread count increased
if (
action.SVC_TYPE === SVC_TYPE_EVENT &&
action.SSVC_TYPE === SSVC_TYPE_EVENT_SEND_RES
) {
/**
* RES noti .
* unread count .
*/
} else {
if (!!trgtRoomInfos && !!trgtRoomInfos[action.roomSeq]) {
const noReadCnt = trgtRoomInfos[action.roomSeq].noReadCnt;
this.store.dispatch(
SyncStore.updateUnreadCount({
roomSeq: action.roomSeq,
noReadCnt: noReadCnt + 1
})
);
}
}
}
// 대화 > 리스트 :: finalEventMessage refresh
this.store.dispatch(ChatStore.newEventMessage(action));