Prevent audio miniplayer from being minimized with gestures

This commit is contained in:
Bnyro 2023-06-14 09:31:06 +02:00
parent a3f103ab10
commit 1c1520efde

View File

@ -81,7 +81,9 @@ class SingleViewTouchableMotionLayout(context: Context, attributeSet: AttributeS
override fun onTouchEvent(event: MotionEvent): Boolean { override fun onTouchEvent(event: MotionEvent): Boolean {
gestureDetector.onTouchEvent(event) gestureDetector.onTouchEvent(event)
// gestureDetector.onTouchEvent(event) // don't react when trying to minimize audio player with gestures
if (viewToDetectTouch.id == R.id.audio_player_container && progress != 1f) return true
when (event.actionMasked) { when (event.actionMasked) {
MotionEvent.ACTION_UP, MotionEvent.ACTION_CANCEL -> { MotionEvent.ACTION_UP, MotionEvent.ACTION_CANCEL -> {
touchStarted = false touchStarted = false