Skip to content

Commit

Permalink
fix: onScroll overrides nothing
Browse files Browse the repository at this point in the history
  • Loading branch information
4cc3ssX committed Jun 30, 2024
1 parent 0655ad3 commit 3779160
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 3779160

Please sign in to comment.