Skip to content

Commit

Permalink
Merge pull request #28 from 4cc3ssX/fix/onscroll-override-nothing-sdk-34
Browse files Browse the repository at this point in the history
fix: onScroll overrides nothing on Android SDK 34
  • Loading branch information
baronha authored Jun 30, 2024
2 parents 3ee8564 + 3779160 commit 08177c2
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion android/src/main/java/com/ting/TingModule.kt
Original file line number Diff line number Diff line change
Expand Up @@ -80,7 +80,7 @@ class TingModule internal constructor(context: ReactApplicationContext) : TingSp
// Add drag gesture recognizer
contentView?.let { contentView ->
val gestureDetector = GestureDetector(context, object : GestureDetector.SimpleOnGestureListener() {
override fun onScroll(e1: MotionEvent, e2: MotionEvent, distanceX: Float, distanceY: Float): Boolean {
override fun onScroll(e1: MotionEvent?, e2: MotionEvent, distanceX: Float, distanceY: Float): Boolean {
// Check if the user scrolls vertically and dismiss the toast window if needed
if (abs(distanceY) > abs(distanceX)) {
if (position == Gravity.TOP && distanceY > dragThreshold) { // Dismiss upward if toast is at the top
Expand Down

0 comments on commit 08177c2

Please sign in to comment.