File tree Expand file tree Collapse file tree 2 files changed +4
-4
lines changed
android/src/main/java/com/reactcommunity/rndatetimepicker Expand file tree Collapse file tree 2 files changed +4
-4
lines changed Original file line number Diff line number Diff line change @@ -18,12 +18,12 @@ class MaterialDatePickerModule(reactContext: ReactApplicationContext): NativeMod
1818 }
1919
2020 override fun dismiss (promise : Promise ? ) {
21- val activity = currentActivity as FragmentActivity ?
21+ val activity = reactApplicationContext. currentActivity as FragmentActivity ?
2222 dismissDialog(activity, NAME , promise)
2323 }
2424
2525 override fun open (params : ReadableMap , promise : Promise ) {
26- val activity = currentActivity as FragmentActivity ?
26+ val activity = reactApplicationContext. currentActivity as FragmentActivity ?
2727 if (activity == null ) {
2828 promise.reject(
2929 RNConstants .ERROR_NO_ACTIVITY ,
Original file line number Diff line number Diff line change @@ -19,12 +19,12 @@ class MaterialTimePickerModule(reactContext: ReactApplicationContext) :
1919 }
2020
2121 override fun dismiss (promise : Promise ? ) {
22- val activity = currentActivity as FragmentActivity ?
22+ val activity = reactApplicationContext. currentActivity as FragmentActivity ?
2323 dismissDialog(activity, NAME , promise)
2424 }
2525
2626 override fun open (params : ReadableMap , promise : Promise ) {
27- val activity = currentActivity as FragmentActivity ?
27+ val activity = reactApplicationContext. currentActivity as FragmentActivity ?
2828 if (activity == null ) {
2929 promise.reject(
3030 RNConstants .ERROR_NO_ACTIVITY ,
You can’t perform that action at this time.
0 commit comments