restore lock player functionality

This commit is contained in:
Bnyro 2022-07-27 08:59:44 +02:00
parent 51ef6cab24
commit 217dd9b990
3 changed files with 3 additions and 8 deletions

View File

@ -1520,10 +1520,10 @@ class PlayerFragment : Fragment() {
// disable double tap to seek when the player is locked
if (isLocked) {
// enable fast forward and rewind by double tapping
binding.doubleTapOverlay.visibility = View.VISIBLE
enableDoubleTapToSeek()
} else {
// disable fast forward and rewind by double tapping
binding.doubleTapOverlay.visibility = View.GONE
binding.player.setOnDoubleTapListener(null)
}
}

View File

@ -1,7 +1,5 @@
package com.github.libretube.util
import android.view.MotionEvent
interface OnCustomEventListener {
fun onEvent(x: Float)
}

View File

@ -3,11 +3,8 @@ package com.github.libretube.views
import android.annotation.SuppressLint
import android.content.Context
import android.util.AttributeSet
import android.util.Log
import android.view.GestureDetector
import android.view.MotionEvent
import android.view.View
import android.view.View.OnTouchListener
import com.github.libretube.R
import com.github.libretube.databinding.ExoStyledPlayerControlViewBinding
import com.github.libretube.util.DoubleTapListener
@ -28,7 +25,7 @@ internal class CustomExoPlayerView(
var xPos = 0F
fun setOnDoubleTapListener(
eventListener: OnCustomEventListener
eventListener: OnCustomEventListener?
) {
doubleTapListener = eventListener
}