react-native-persona 2.38.1-beta.2 → 2.39.0
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
CHANGED
|
@@ -72,7 +72,7 @@ dependencies {
|
|
|
72
72
|
implementation("com.facebook.react:react-android:+")
|
|
73
73
|
|
|
74
74
|
// NB: be sure to bump `nfc-impl` in example/android/app/build.gradle as well
|
|
75
|
-
implementation 'com.withpersona.sdk2:inquiry:2.
|
|
75
|
+
implementation 'com.withpersona.sdk2:inquiry:2.39.0'
|
|
76
76
|
implementation("androidx.fragment:fragment:1.8.6")
|
|
77
77
|
|
|
78
78
|
// Kotlin
|
package/android/src/main/java/com/withpersona/sdk2/reactnative/PersonaInquiryViewManager.java
CHANGED
|
@@ -33,6 +33,10 @@ class PersonaInquiryViewManager extends ViewGroupManager<FrameLayout> {
|
|
|
33
33
|
@Nullable
|
|
34
34
|
ThemedReactContext reactContext;
|
|
35
35
|
|
|
36
|
+
@Nullable
|
|
37
|
+
private FrameLayout pendingRoot;
|
|
38
|
+
private int pendingViewId = -1;
|
|
39
|
+
|
|
36
40
|
@NonNull
|
|
37
41
|
@Override
|
|
38
42
|
public String getName() {
|
|
@@ -74,7 +78,13 @@ class PersonaInquiryViewManager extends ViewGroupManager<FrameLayout> {
|
|
|
74
78
|
|
|
75
79
|
switch (commandId) {
|
|
76
80
|
case COMMAND_CREATE:
|
|
77
|
-
|
|
81
|
+
Object inquiryOptions = root.getTag(R.id.pi2_rn_inquiry_options);
|
|
82
|
+
if (inquiryOptions instanceof ReadableMap) {
|
|
83
|
+
createFragment(root, reactNativeViewId);
|
|
84
|
+
} else {
|
|
85
|
+
pendingRoot = root;
|
|
86
|
+
pendingViewId = reactNativeViewId;
|
|
87
|
+
}
|
|
78
88
|
break;
|
|
79
89
|
default: {}
|
|
80
90
|
}
|
|
@@ -83,6 +93,14 @@ class PersonaInquiryViewManager extends ViewGroupManager<FrameLayout> {
|
|
|
83
93
|
@ReactProp(name = "inquiry")
|
|
84
94
|
public void setInquiry(FrameLayout view, @Nullable ReadableMap options) {
|
|
85
95
|
view.setTag(R.id.pi2_rn_inquiry_options, options);
|
|
96
|
+
|
|
97
|
+
if (pendingRoot != null && pendingViewId != -1) {
|
|
98
|
+
FrameLayout root = pendingRoot;
|
|
99
|
+
int viewId = pendingViewId;
|
|
100
|
+
pendingRoot = null;
|
|
101
|
+
pendingViewId = -1;
|
|
102
|
+
createFragment(root, viewId);
|
|
103
|
+
}
|
|
86
104
|
}
|
|
87
105
|
|
|
88
106
|
@Override
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "react-native-persona",
|
|
3
3
|
"title": "React Native Persona",
|
|
4
|
-
"version": "2.
|
|
4
|
+
"version": "2.39.0",
|
|
5
5
|
"description": "Launch a mobile native implementation of the Persona inquiry flow from React Native.",
|
|
6
6
|
"homepage": "https://docs.withpersona.com/docs/react-native-sdk-integration",
|
|
7
7
|
"bugs": "https://github.com/persona-id/persona-inquiry-sdk-public",
|