Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix(android): Support for RN 0.75.1 #86

Merged
merged 2 commits into from
Aug 22, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -99,14 +99,14 @@ class RootSheetView(private val context: Context?) :
get() = context as ThemedReactContext

override fun onInterceptTouchEvent(event: MotionEvent): Boolean {
jSTouchDispatcher.handleTouchEvent(event, eventDispatcher)
eventDispatcher?.let { jSTouchDispatcher.handleTouchEvent(event, it) }
jSPointerDispatcher?.handleMotionEvent(event, eventDispatcher, true)
return super.onInterceptTouchEvent(event)
}

@SuppressLint("ClickableViewAccessibility")
override fun onTouchEvent(event: MotionEvent): Boolean {
jSTouchDispatcher.handleTouchEvent(event, eventDispatcher)
eventDispatcher?.let { jSTouchDispatcher.handleTouchEvent(event, it) }
jSPointerDispatcher?.handleMotionEvent(event, eventDispatcher, false)
super.onTouchEvent(event)

Expand All @@ -127,16 +127,20 @@ class RootSheetView(private val context: Context?) :

@Deprecated("Deprecated in Java")
override fun onChildStartedNativeGesture(ev: MotionEvent?) {
jSTouchDispatcher.onChildStartedNativeGesture(ev, eventDispatcher)
eventDispatcher?.let {
if (ev != null) {
jSTouchDispatcher.onChildStartedNativeGesture(ev, it)
}
}
}

override fun onChildStartedNativeGesture(childView: View, ev: MotionEvent) {
jSTouchDispatcher.onChildStartedNativeGesture(ev, eventDispatcher)
eventDispatcher?.let { jSTouchDispatcher.onChildStartedNativeGesture(ev, it) }
jSPointerDispatcher?.onChildStartedNativeGesture(childView, ev, eventDispatcher)
}

override fun onChildEndedNativeGesture(childView: View, ev: MotionEvent) {
jSTouchDispatcher.onChildEndedNativeGesture(ev, eventDispatcher)
eventDispatcher?.let { jSTouchDispatcher.onChildEndedNativeGesture(ev, it) }
jSPointerDispatcher?.onChildEndedNativeGesture()
}

Expand Down