diff --git a/app/src/main/java/com/github/libretube/util/CustomOnScaleGestureListener.kt b/app/src/main/java/com/github/libretube/util/CustomOnScaleGestureListener.kt deleted file mode 100644 index 7d166c68d..000000000 --- a/app/src/main/java/com/github/libretube/util/CustomOnScaleGestureListener.kt +++ /dev/null @@ -1,34 +0,0 @@ -package com.github.libretube.util - -import android.util.Log -import android.view.ScaleGestureDetector -import com.google.android.exoplayer2.ui.AspectRatioFrameLayout -import com.google.android.exoplayer2.ui.StyledPlayerView - -class CustomOnScaleGestureListener( - private val player: StyledPlayerView -) : ScaleGestureDetector.SimpleOnScaleGestureListener() { - private var scaleFactor = 0f - - override fun onScale( - detector: ScaleGestureDetector - ): Boolean { - scaleFactor = detector.scaleFactor - return true - } - - override fun onScaleBegin( - detector: ScaleGestureDetector - ): Boolean { - return true - } - - override fun onScaleEnd(detector: ScaleGestureDetector) { - Log.e("scale", "scale") - if (scaleFactor > 1) { - player.resizeMode = AspectRatioFrameLayout.RESIZE_MODE_ZOOM - } else { - player.resizeMode = AspectRatioFrameLayout.RESIZE_MODE_FIT - } - } -}