bugfix :: 현재 열려 있는 대화방이어도, windowState 가 minimal, hidden 일 경우에는 noti 팝업을 보여주도록 수정.

This commit is contained in:
leejinho 2020-02-14 14:59:40 +09:00
parent c07d13eae8
commit 0686c1d512

View File

@ -92,7 +92,8 @@ import {
NotificationRequest, NotificationRequest,
NativeService, NativeService,
UCAP_NATIVE_SERVICE, UCAP_NATIVE_SERVICE,
NotificationType NotificationType,
WindowState
} from '@ucap-webmessenger/native'; } from '@ucap-webmessenger/native';
import { StringUtil, DialogService } from '@ucap-webmessenger/ui'; import { StringUtil, DialogService } from '@ucap-webmessenger/ui';
import { import {
@ -208,9 +209,10 @@ export class AppNotificationService {
(state: any) => (state: any) =>
state.messenger.sync.room.entities as Dictionary<RoomInfo> state.messenger.sync.room.entities as Dictionary<RoomInfo>
) )
) ),
this.nativeService.windowStateChanged()
), ),
tap(([notiOrRes, curRoomInfo, roomList]) => { tap(([notiOrRes, curRoomInfo, roomList, windowStateChanged]) => {
switch (notiOrRes.SSVC_TYPE) { switch (notiOrRes.SSVC_TYPE) {
case SSVC_TYPE_EVENT_SEND_RES: case SSVC_TYPE_EVENT_SEND_RES:
case SSVC_TYPE_EVENT_SEND_NOTI: case SSVC_TYPE_EVENT_SEND_NOTI:
@ -243,7 +245,10 @@ export class AppNotificationService {
if ( if (
!!curRoomInfo && !!curRoomInfo &&
!!curRoomInfo.roomSeq && !!curRoomInfo.roomSeq &&
curRoomInfo.roomSeq === noti.roomSeq curRoomInfo.roomSeq === noti.roomSeq &&
!!windowStateChanged &&
windowStateChanged !== WindowState.Minimized &&
windowStateChanged !== WindowState.Hidden
) { ) {
doNoti = false; doNoti = false;
} }