Commit 34328162 authored by yogevbd's avatar yogevbd

Remove NOTIFICATION_RECEIVED_FOREGROUND_EVENT_NAME

parent 6adee3e7
...@@ -23,7 +23,6 @@ import com.wix.reactnativenotifications.core.ProxyService; ...@@ -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_OPENED_EVENT_NAME;
import static com.wix.reactnativenotifications.Defs.NOTIFICATION_RECEIVED_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 { public class PushNotification implements IPushNotification {
...@@ -64,9 +63,6 @@ public class PushNotification implements IPushNotification { ...@@ -64,9 +63,6 @@ public class PushNotification implements IPushNotification {
public void onReceived() throws InvalidNotificationException { public void onReceived() throws InvalidNotificationException {
postNotification(null); postNotification(null);
notifyReceivedToJS(); notifyReceivedToJS();
if (mAppLifecycleFacade.isAppVisible()) {
notifiyReceivedForegroundNotificationToJS();
}
} }
@Override @Override
...@@ -199,10 +195,6 @@ public class PushNotification implements IPushNotification { ...@@ -199,10 +195,6 @@ public class PushNotification implements IPushNotification {
mJsIOHelper.sendEventToJS(NOTIFICATION_RECEIVED_EVENT_NAME, mNotificationProps.asBundle(), mAppLifecycleFacade.getRunningReactContext()); 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() { private void notifyOpenedToJS() {
mJsIOHelper.sendEventToJS(NOTIFICATION_OPENED_EVENT_NAME, mNotificationProps.asBundle(), mAppLifecycleFacade.getRunningReactContext()); mJsIOHelper.sendEventToJS(NOTIFICATION_OPENED_EVENT_NAME, mNotificationProps.asBundle(), mAppLifecycleFacade.getRunningReactContext());
} }
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment