bugfix :: EVENT_SEND_NOTI 수신시 조직도 탭 열려 있으면 노티, 알림 추도록 수정.

This commit is contained in:
leejinho 2020-03-30 18:44:53 +09:00
parent 59016a6709
commit 589eb0206d

View File

@ -127,7 +127,8 @@ import {
LogoutInfo,
KEY_LOGOUT_INFO,
KEY_VER_INFO,
KEY_LOGIN_RES_INFO
KEY_LOGIN_RES_INFO,
MainMenu
} from '@app/types';
import { TranslateService } from '@ngx-translate/core';
import { deleteMessageSuccess } from '@app/store/messenger/message';
@ -248,10 +249,22 @@ export class AppNotificationService {
(state: any) =>
state.messenger.sync.buddy2.entities as Dictionary<UserInfo>
)
),
this.store.pipe(
select(
(state: any) => state.messenger.settings.gnbMenuIndex as MainMenu
)
)
),
tap(
([notiOrRes, curRoomInfo, curRoomUserInfo, roomList, buddyList]) => {
([
notiOrRes,
curRoomInfo,
curRoomUserInfo,
roomList,
buddyList,
gnbMenuIndex
]) => {
switch (notiOrRes.SSVC_TYPE) {
case SSVC_TYPE_EVENT_SEND_RES:
case SSVC_TYPE_EVENT_SEND_NOTI:
@ -296,6 +309,11 @@ export class AppNotificationService {
doNoti = true;
}
// 조직도 탭이 열려 있다면
if (gnbMenuIndex === MainMenu.Organization) {
doNoti = true;
}
// 방별 알림이 꺼져 있으면 노티 안함. > 우선순위 최상위.
if (
!!roomList[noti.roomSeq] &&