Fix compilation errors

This commit is contained in:
Isira Seneviratne 2023-07-26 05:29:45 +05:30
parent 3dc29b1983
commit 5d9d27105a
3 changed files with 5 additions and 5 deletions

View File

@ -47,12 +47,12 @@ class AudioPlayerThumbnailListener(context: Context, private val listener: Audio
}
override fun onScroll(
e1: MotionEvent,
e1: MotionEvent?,
e2: MotionEvent,
distanceX: Float,
distanceY: Float
): Boolean {
val insideThreshHold = abs(e2.y - e1.y) <= MOVEMENT_THRESHOLD
val insideThreshHold = abs(e2.y - e1!!.y) <= MOVEMENT_THRESHOLD
// If the movement is inside threshold or scroll is horizontal then return false
if (!isMoving && (insideThreshHold || abs(distanceX) > abs(distanceY))) {

View File

@ -135,14 +135,14 @@ class PlayerGestureController(activity: BaseActivity, private val listener: Play
}
override fun onScroll(
e1: MotionEvent,
e1: MotionEvent?,
e2: MotionEvent,
distanceX: Float,
distanceY: Float
): Boolean {
if (!isEnabled || scaleGestureDetector.isInProgress) return false
val insideThreshHold = abs(e2.y - e1.y) <= MOVEMENT_THRESHOLD
val insideThreshHold = abs(e2.y - e1!!.y) <= MOVEMENT_THRESHOLD
val insideBorder =
(e1.x < BORDER_THRESHOLD || e1.y < BORDER_THRESHOLD || e1.x > width - BORDER_THRESHOLD || e1.y > height - BORDER_THRESHOLD)

View File

@ -58,7 +58,7 @@ class SingleViewTouchableMotionLayout(context: Context, attributeSet: AttributeS
}
override fun onScroll(
e1: MotionEvent,
e1: MotionEvent?,
e2: MotionEvent,
distanceX: Float,
distanceY: Float