mirror of
https://github.com/libre-tube/LibreTube.git
synced 2024-12-15 14:50:30 +05:30
Fix compilation errors
This commit is contained in:
parent
3dc29b1983
commit
5d9d27105a
@ -47,12 +47,12 @@ class AudioPlayerThumbnailListener(context: Context, private val listener: Audio
|
|||||||
}
|
}
|
||||||
|
|
||||||
override fun onScroll(
|
override fun onScroll(
|
||||||
e1: MotionEvent,
|
e1: MotionEvent?,
|
||||||
e2: MotionEvent,
|
e2: MotionEvent,
|
||||||
distanceX: Float,
|
distanceX: Float,
|
||||||
distanceY: Float
|
distanceY: Float
|
||||||
): Boolean {
|
): 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 the movement is inside threshold or scroll is horizontal then return false
|
||||||
if (!isMoving && (insideThreshHold || abs(distanceX) > abs(distanceY))) {
|
if (!isMoving && (insideThreshHold || abs(distanceX) > abs(distanceY))) {
|
||||||
|
@ -135,14 +135,14 @@ class PlayerGestureController(activity: BaseActivity, private val listener: Play
|
|||||||
}
|
}
|
||||||
|
|
||||||
override fun onScroll(
|
override fun onScroll(
|
||||||
e1: MotionEvent,
|
e1: MotionEvent?,
|
||||||
e2: MotionEvent,
|
e2: MotionEvent,
|
||||||
distanceX: Float,
|
distanceX: Float,
|
||||||
distanceY: Float
|
distanceY: Float
|
||||||
): Boolean {
|
): Boolean {
|
||||||
if (!isEnabled || scaleGestureDetector.isInProgress) return false
|
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 =
|
val insideBorder =
|
||||||
(e1.x < BORDER_THRESHOLD || e1.y < BORDER_THRESHOLD || e1.x > width - BORDER_THRESHOLD || e1.y > height - BORDER_THRESHOLD)
|
(e1.x < BORDER_THRESHOLD || e1.y < BORDER_THRESHOLD || e1.x > width - BORDER_THRESHOLD || e1.y > height - BORDER_THRESHOLD)
|
||||||
|
|
||||||
|
@ -58,7 +58,7 @@ class SingleViewTouchableMotionLayout(context: Context, attributeSet: AttributeS
|
|||||||
}
|
}
|
||||||
|
|
||||||
override fun onScroll(
|
override fun onScroll(
|
||||||
e1: MotionEvent,
|
e1: MotionEvent?,
|
||||||
e2: MotionEvent,
|
e2: MotionEvent,
|
||||||
distanceX: Float,
|
distanceX: Float,
|
||||||
distanceY: Float
|
distanceY: Float
|
||||||
|
Loading…
Reference in New Issue
Block a user