@imatis/react-native-notifications 4.1.2-imatis.16 → 4.1.2-imatis.17
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/lib/android/.gradle/checksums/checksums.lock +0 -0
- package/lib/android/.gradle/checksums/md5-checksums.bin +0 -0
- package/lib/android/.gradle/checksums/sha1-checksums.bin +0 -0
- package/lib/android/app/src/main/java/com/wix/reactnativenotifications/core/notification/PushNotification.java +7 -4
- package/package.json +1 -1
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
@@ -71,11 +71,14 @@ public class PushNotification implements IPushNotification {
|
|
|
71
71
|
}
|
|
72
72
|
|
|
73
73
|
@Override
|
|
74
|
-
public void onReceived()
|
|
75
|
-
|
|
76
|
-
|
|
74
|
+
public void onReceived() {
|
|
75
|
+
ReactContext reactContext = mAppLifecycleFacade.getRunningReactContext();
|
|
76
|
+
boolean hasActiveCatalystInstance = reactContext != null && reactContext.hasActiveCatalystInstance();
|
|
77
|
+
if (!mAppLifecycleFacade.isAppVisible() || !hasActiveCatalystInstance) {
|
|
77
78
|
postNotification(null);
|
|
78
|
-
|
|
79
|
+
notifyReceivedBackgroundToJS();
|
|
80
|
+
}
|
|
81
|
+
if (hasActiveCatalystInstance) {
|
|
79
82
|
notifyReceivedToJS();
|
|
80
83
|
}
|
|
81
84
|
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@imatis/react-native-notifications",
|
|
3
|
-
"version": "4.1.2-imatis.
|
|
3
|
+
"version": "4.1.2-imatis.17",
|
|
4
4
|
"description": "Advanced Push Notifications (Silent, interactive notifications) for iOS & Android",
|
|
5
5
|
"author": "Lidan Hifi <lidan.hifi@gmail.com>",
|
|
6
6
|
"license": "MIT",
|