Commit 2e74b4d2 authored by yogevbd's avatar yogevbd

Revert "Fix push receiving from dead state"

This reverts commit 4cd72c48.
parent 0bf5e422
......@@ -104,6 +104,7 @@ public class PushNotification implements IPushNotification {
protected void digestNotification() {
if (!mAppLifecycleFacade.isReactInitialized()) {
setAsInitialNotification();
launchOrResumeApp();
return;
}
......@@ -133,6 +134,10 @@ public class PushNotification implements IPushNotification {
protected void dispatchUponVisibility() {
mAppLifecycleFacade.addVisibilityListener(getIntermediateAppVisibilityListener());
// Make the app visible so that we'll dispatch the notification opening when visibility changes to 'true' (see
// above listener registration).
launchOrResumeApp();
}
protected AppVisibilityListener getIntermediateAppVisibilityListener() {
......@@ -204,4 +209,9 @@ public class PushNotification implements IPushNotification {
private void notifyOpenedToJS() {
mJsIOHelper.sendEventToJS(NOTIFICATION_OPENED_EVENT_NAME, mNotificationProps.asBundle(), mAppLifecycleFacade.getRunningReactContext());
}
protected void launchOrResumeApp() {
final Intent intent = mAppLaunchHelper.getLaunchIntent(mContext);
mContext.startActivity(intent);
}
}
{
"name": "react-native-notifications",
"version": "1.2.52",
"version": "1.2.6",
"description": "Advanced Push Notifications (Silent, interactive notifications) for iOS & Android",
"author": "Lidan Hifi <lidan.hifi@gmail.com>",
"license": "MIT",
......
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