react-native-purchases-ui 9.4.1 → 9.4.2
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/android/build.gradle +1 -1
- package/android/src/main/java/com/revenuecat/purchases/react/ui/BasePaywallViewManager.kt +3 -1
- package/android/src/main/java/com/revenuecat/purchases/react/ui/RNCustomerCenterModule.kt +1 -1
- package/android/src/main/java/com/revenuecat/purchases/react/ui/RNPaywallsModule.kt +1 -1
- package/package.json +2 -2
package/android/build.gradle
CHANGED
@@ -79,7 +79,9 @@ internal abstract class BasePaywallViewManager<T : View> : SimpleViewManager<T>(
|
|
79
79
|
val offeringMap = options.getDynamic(OPTION_OFFERING).asMap();
|
80
80
|
|
81
81
|
// this is a workaround for the fact that getDynamic doesn't work with null values
|
82
|
-
|
82
|
+
// Null check required for version 0.81 of RN where `asMap()` returns optional
|
83
|
+
@Suppress("UNNECESSARY_SAFE_CALL")
|
84
|
+
val offeringIdentifier = offeringMap?.getString(OFFERING_IDENTIFIER)
|
83
85
|
if (offeringIdentifier == null) {
|
84
86
|
return
|
85
87
|
}
|
@@ -63,7 +63,7 @@ internal class RNCustomerCenterModule(
|
|
63
63
|
fun presentCustomerCenter(
|
64
64
|
promise: Promise
|
65
65
|
) {
|
66
|
-
currentActivity?.let {
|
66
|
+
reactApplicationContext.currentActivity?.let {
|
67
67
|
customerCenterPromise = promise
|
68
68
|
presentCustomerCenterFromActivity(it)
|
69
69
|
} ?: run {
|
@@ -23,7 +23,7 @@ internal class RNPaywallsModule(
|
|
23
23
|
|
24
24
|
private val currentFragmentActivity: FragmentActivity?
|
25
25
|
get() {
|
26
|
-
return when (val currentActivity = currentActivity) {
|
26
|
+
return when (val currentActivity = reactApplicationContext.currentActivity) {
|
27
27
|
is FragmentActivity -> currentActivity
|
28
28
|
else -> {
|
29
29
|
Log.e(NAME, "RevenueCat paywalls require applications to use a FragmentActivity")
|
package/package.json
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
{
|
2
2
|
"name": "react-native-purchases-ui",
|
3
3
|
"title": "React Native Purchases UI",
|
4
|
-
"version": "9.4.
|
4
|
+
"version": "9.4.2",
|
5
5
|
"description": "React Native in-app purchases and subscriptions made easy. Supports iOS and Android.",
|
6
6
|
"main": "lib/commonjs/index",
|
7
7
|
"module": "lib/module/index",
|
@@ -77,7 +77,7 @@
|
|
77
77
|
"peerDependencies": {
|
78
78
|
"react": "*",
|
79
79
|
"react-native": ">= 0.73.0",
|
80
|
-
"react-native-purchases": "9.4.
|
80
|
+
"react-native-purchases": "9.4.2",
|
81
81
|
"react-native-web": "*"
|
82
82
|
},
|
83
83
|
"peerDependenciesMeta": {
|