Skip to content

Commit 45b6898

Browse files
fix(android): use reactApplicationContext.currentActivity in stepUp and openAdminPortal
1 parent da60716 commit 45b6898

1 file changed

Lines changed: 2 additions & 2 deletions

File tree

android/src/main/java/com/frontegg/reactnative/FronteggRNModule.kt

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -170,7 +170,7 @@ class FronteggRNModule(val reactContext: ReactApplicationContext) :
170170

171171
@ReactMethod
172172
fun stepUp(maxAgeSeconds: Double, promise: Promise) {
173-
val activity = currentActivity
173+
val activity = reactApplicationContext.currentActivity
174174
if (activity == null) {
175175
promise.reject("NO_ACTIVITY", "Current activity is null")
176176
return
@@ -220,7 +220,7 @@ class FronteggRNModule(val reactContext: ReactApplicationContext) :
220220

221221
@ReactMethod
222222
fun openAdminPortal(promise: Promise) {
223-
val activity = currentActivity
223+
val activity = reactApplicationContext.currentActivity
224224
if (activity == null) {
225225
promise.reject("NO_ACTIVITY", "Cannot open Admin Portal without an active Activity")
226226
return

0 commit comments

Comments
 (0)