From 0686c1d5127717960f19902b63bc9c7170837a62 Mon Sep 17 00:00:00 2001 From: leejinho Date: Fri, 14 Feb 2020 14:59:40 +0900 Subject: [PATCH] =?UTF-8?q?bugfix=20::=20=20=ED=98=84=EC=9E=AC=20=EC=97=B4?= =?UTF-8?q?=EB=A0=A4=20=EC=9E=88=EB=8A=94=20=EB=8C=80=ED=99=94=EB=B0=A9?= =?UTF-8?q?=EC=9D=B4=EC=96=B4=EB=8F=84,=20windowState=20=EA=B0=80=20minima?= =?UTF-8?q?l,=20hidden=20=EC=9D=BC=20=EA=B2=BD=EC=9A=B0=EC=97=90=EB=8A=94?= =?UTF-8?q?=20noti=20=ED=8C=9D=EC=97=85=EC=9D=84=20=EB=B3=B4=EC=97=AC?= =?UTF-8?q?=EC=A3=BC=EB=8F=84=EB=A1=9D=20=EC=88=98=EC=A0=95.?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../src/app/services/notification.service.ts | 13 +++++++++---- 1 file changed, 9 insertions(+), 4 deletions(-) diff --git a/projects/ucap-webmessenger-app/src/app/services/notification.service.ts b/projects/ucap-webmessenger-app/src/app/services/notification.service.ts index 2cc63bad..7f9eff2c 100644 --- a/projects/ucap-webmessenger-app/src/app/services/notification.service.ts +++ b/projects/ucap-webmessenger-app/src/app/services/notification.service.ts @@ -92,7 +92,8 @@ import { NotificationRequest, NativeService, UCAP_NATIVE_SERVICE, - NotificationType + NotificationType, + WindowState } from '@ucap-webmessenger/native'; import { StringUtil, DialogService } from '@ucap-webmessenger/ui'; import { @@ -208,9 +209,10 @@ export class AppNotificationService { (state: any) => state.messenger.sync.room.entities as Dictionary ) - ) + ), + this.nativeService.windowStateChanged() ), - tap(([notiOrRes, curRoomInfo, roomList]) => { + tap(([notiOrRes, curRoomInfo, roomList, windowStateChanged]) => { switch (notiOrRes.SSVC_TYPE) { case SSVC_TYPE_EVENT_SEND_RES: case SSVC_TYPE_EVENT_SEND_NOTI: @@ -243,7 +245,10 @@ export class AppNotificationService { if ( !!curRoomInfo && !!curRoomInfo.roomSeq && - curRoomInfo.roomSeq === noti.roomSeq + curRoomInfo.roomSeq === noti.roomSeq && + !!windowStateChanged && + windowStateChanged !== WindowState.Minimized && + windowStateChanged !== WindowState.Hidden ) { doNoti = false; }