@doorstepai/dropoff-sdk 2.2.5 → 2.2.6
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.
|
@@ -498,7 +498,7 @@ class DoorstepAIModule(private val reactContext: ReactApplicationContext) :
|
|
|
498
498
|
* signal a refusal reports as the re-askable DENIED instead of
|
|
499
499
|
* PERMANENTLY_DENIED.
|
|
500
500
|
*/
|
|
501
|
-
private fun permissionContext() = currentActivity ?: reactContext
|
|
501
|
+
private fun permissionContext() = reactContext.currentActivity ?: reactContext
|
|
502
502
|
|
|
503
503
|
@ReactMethod
|
|
504
504
|
fun checkPermissions(permissions: ReadableArray?, promise: Promise) {
|
|
@@ -567,7 +567,7 @@ class DoorstepAIModule(private val reactContext: ReactApplicationContext) :
|
|
|
567
567
|
PERMISSION_ANSWER_TIMEOUT_MS
|
|
568
568
|
}
|
|
569
569
|
|
|
570
|
-
val activity = currentActivity
|
|
570
|
+
val activity = reactContext.currentActivity
|
|
571
571
|
if (activity == null) {
|
|
572
572
|
promise.reject("NO_ACTIVITY", "requestPermissions needs a resumed Activity to prompt from")
|
|
573
573
|
return
|
|
@@ -773,7 +773,7 @@ class DoorstepAIModule(private val reactContext: ReactApplicationContext) :
|
|
|
773
773
|
|
|
774
774
|
@ReactMethod
|
|
775
775
|
fun requestBackgroundLocationPermission(promise: Promise) {
|
|
776
|
-
val activity = currentActivity
|
|
776
|
+
val activity = reactContext.currentActivity
|
|
777
777
|
if (activity == null) {
|
|
778
778
|
promise.reject("NO_ACTIVITY", "requestBackgroundLocationPermission needs a resumed Activity to prompt from")
|
|
779
779
|
return
|
|
@@ -50,9 +50,9 @@ class DoorstepEmbedViewManager : SimpleViewManager<DoorstepEmbedView>() {
|
|
|
50
50
|
putString("mode", mode.value)
|
|
51
51
|
})
|
|
52
52
|
}
|
|
53
|
-
view.onError = {
|
|
53
|
+
view.onError = { error ->
|
|
54
54
|
emit(view, ERROR_EVENT, Arguments.createMap().apply {
|
|
55
|
-
putString("message", message)
|
|
55
|
+
putString("message", error.message)
|
|
56
56
|
})
|
|
57
57
|
}
|
|
58
58
|
return view
|
|
@@ -176,4 +176,3 @@ class DoorstepEmbedViewManager : SimpleViewManager<DoorstepEmbedView>() {
|
|
|
176
176
|
const val DEFAULT_EXPANDED_HEIGHT = 600f
|
|
177
177
|
}
|
|
178
178
|
}
|
|
179
|
-
|