Skip to content

Commit

Permalink
fix(android): requestDisallowInterceptTouchEvent broken (#3333)
Browse files Browse the repository at this point in the history
* Fix requestDisallowInterceptTouchEvent broken

* Update RNMBXMapViewManager.kt

* Fix requestDisallowInterceptTouchEvent broken
  • Loading branch information
VolkerLieber authored Jan 21, 2024
1 parent 85bb28e commit 2784b74
Showing 1 changed file with 10 additions and 6 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -1512,14 +1512,18 @@ fun RNMBXMapView.updateRequestDisallowInterceptTouchEvent(oldValue: Boolean, val
return
}
if (value) {
mapView.setOnTouchListener { view, event ->
this.requestDisallowInterceptTouchEvent(true)
mapView.onTouchEvent(event)
true
withMapView {
it.setOnTouchListener { view, event ->
this.requestDisallowInterceptTouchEvent(true)
mapView.onTouchEvent(event)
true
}
}
} else {
mapView.setOnTouchListener { view, event ->
mapView.onTouchEvent(event)
withMapView {
it.setOnTouchListener { view, event ->
mapView.onTouchEvent(event)
}
}
}
}
Expand Down

0 comments on commit 2784b74

Please sign in to comment.