@@ -99,14 +99,14 @@ class RootSheetView(private val context: Context?) :
99
99
get() = context as ThemedReactContext
100
100
101
101
override fun onInterceptTouchEvent (event : MotionEvent ): Boolean {
102
- jSTouchDispatcher.handleTouchEvent(event, eventDispatcher)
102
+ eventDispatcher?. let { jSTouchDispatcher.handleTouchEvent(event, it) }
103
103
jSPointerDispatcher?.handleMotionEvent(event, eventDispatcher, true )
104
104
return super .onInterceptTouchEvent(event)
105
105
}
106
106
107
107
@SuppressLint(" ClickableViewAccessibility" )
108
108
override fun onTouchEvent (event : MotionEvent ): Boolean {
109
- jSTouchDispatcher.handleTouchEvent(event, eventDispatcher)
109
+ eventDispatcher?. let { jSTouchDispatcher.handleTouchEvent(event, it) }
110
110
jSPointerDispatcher?.handleMotionEvent(event, eventDispatcher, false )
111
111
super .onTouchEvent(event)
112
112
@@ -127,16 +127,20 @@ class RootSheetView(private val context: Context?) :
127
127
128
128
@Deprecated(" Deprecated in Java" )
129
129
override fun onChildStartedNativeGesture (ev : MotionEvent ? ) {
130
- jSTouchDispatcher.onChildStartedNativeGesture(ev, eventDispatcher)
130
+ eventDispatcher?.let {
131
+ if (ev != null ) {
132
+ jSTouchDispatcher.onChildStartedNativeGesture(ev, it)
133
+ }
134
+ }
131
135
}
132
136
133
137
override fun onChildStartedNativeGesture (childView : View , ev : MotionEvent ) {
134
- jSTouchDispatcher.onChildStartedNativeGesture(ev, eventDispatcher)
138
+ eventDispatcher?. let { jSTouchDispatcher.onChildStartedNativeGesture(ev, it) }
135
139
jSPointerDispatcher?.onChildStartedNativeGesture(childView, ev, eventDispatcher)
136
140
}
137
141
138
142
override fun onChildEndedNativeGesture (childView : View , ev : MotionEvent ) {
139
- jSTouchDispatcher.onChildEndedNativeGesture(ev, eventDispatcher)
143
+ eventDispatcher?. let { jSTouchDispatcher.onChildEndedNativeGesture(ev, it) }
140
144
jSPointerDispatcher?.onChildEndedNativeGesture()
141
145
}
142
146
0 commit comments