File tree Expand file tree Collapse file tree 1 file changed +4
-6
lines changed
lib/android/app/src/main/java/com/reactnativenavigation/react/modal Expand file tree Collapse file tree 1 file changed +4
-6
lines changed Original file line number Diff line number Diff line change @@ -2,7 +2,9 @@ package com.reactnativenavigation.react.modal
2
2
3
3
import android.app.Activity
4
4
import com.facebook.react.bridge.ReactContext
5
+ import com.facebook.react.uimanager.UIManagerHelper
5
6
import com.facebook.react.uimanager.UIManagerModule
7
+ import com.facebook.react.uimanager.common.UIManagerType
6
8
import com.reactnativenavigation.options.Options
7
9
import com.reactnativenavigation.react.Constants
8
10
import com.reactnativenavigation.viewcontrollers.viewcontroller.ViewController
@@ -35,17 +37,13 @@ class ModalLayoutController(
35
37
36
38
override fun sendOnNavigationButtonPressed (buttonId : String? ) {
37
39
if (buttonId == Constants .HARDWARE_BACK_BUTTON_ID ) {
38
- val dispatcher = reactContext.getNativeModule(
39
- UIManagerModule ::class .java
40
- )?.eventDispatcher
40
+ val dispatcher = UIManagerHelper .getEventDispatcher(reactContext, UIManagerType .FABRIC )
41
41
dispatcher?.dispatchEvent(RequestCloseModalEvent (getHostId()))
42
42
}
43
43
}
44
44
45
45
fun sendShowEvent () {
46
- val dispatcher = reactContext.getNativeModule(
47
- UIManagerModule ::class .java
48
- )?.eventDispatcher
46
+ val dispatcher = UIManagerHelper .getEventDispatcher(reactContext, UIManagerType .FABRIC )
49
47
dispatcher?.dispatchEvent(ShowModalEvent (getHostId()))
50
48
}
51
49
}
You can’t perform that action at this time.
0 commit comments