From 34328162c4012381b781b9071836d7c2c75edaa7 Mon Sep 17 00:00:00 2001 From: yogevbd Date: Wed, 2 Oct 2019 14:44:11 +0300 Subject: [PATCH] Remove NOTIFICATION_RECEIVED_FOREGROUND_EVENT_NAME --- .../core/notification/PushNotification.java | 8 -------- 1 file changed, 8 deletions(-) diff --git a/lib/android/app/src/main/java/com/wix/reactnativenotifications/core/notification/PushNotification.java b/lib/android/app/src/main/java/com/wix/reactnativenotifications/core/notification/PushNotification.java index 524ff07..b7361ba 100644 --- a/lib/android/app/src/main/java/com/wix/reactnativenotifications/core/notification/PushNotification.java +++ b/lib/android/app/src/main/java/com/wix/reactnativenotifications/core/notification/PushNotification.java @@ -23,7 +23,6 @@ import com.wix.reactnativenotifications.core.ProxyService; import static com.wix.reactnativenotifications.Defs.NOTIFICATION_OPENED_EVENT_NAME; import static com.wix.reactnativenotifications.Defs.NOTIFICATION_RECEIVED_EVENT_NAME; -import static com.wix.reactnativenotifications.Defs.NOTIFICATION_RECEIVED_FOREGROUND_EVENT_NAME; public class PushNotification implements IPushNotification { @@ -64,9 +63,6 @@ public class PushNotification implements IPushNotification { public void onReceived() throws InvalidNotificationException { postNotification(null); notifyReceivedToJS(); - if (mAppLifecycleFacade.isAppVisible()) { - notifiyReceivedForegroundNotificationToJS(); - } } @Override @@ -199,10 +195,6 @@ public class PushNotification implements IPushNotification { mJsIOHelper.sendEventToJS(NOTIFICATION_RECEIVED_EVENT_NAME, mNotificationProps.asBundle(), mAppLifecycleFacade.getRunningReactContext()); } - private void notifiyReceivedForegroundNotificationToJS() { - mJsIOHelper.sendEventToJS(NOTIFICATION_RECEIVED_FOREGROUND_EVENT_NAME, mNotificationProps.asBundle(), mAppLifecycleFacade.getRunningReactContext()); - } - private void notifyOpenedToJS() { mJsIOHelper.sendEventToJS(NOTIFICATION_OPENED_EVENT_NAME, mNotificationProps.asBundle(), mAppLifecycleFacade.getRunningReactContext()); } -- 2.26.2