From bb691d324949c7b67b4b28cd8cffb5b7fb7287b9 Mon Sep 17 00:00:00 2001 From: Bnyro Date: Mon, 1 Apr 2024 20:20:24 +0200 Subject: [PATCH] feat: respect swipe controls option in audio mode --- .../com/github/libretube/ui/fragments/AudioPlayerFragment.kt | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/app/src/main/java/com/github/libretube/ui/fragments/AudioPlayerFragment.kt b/app/src/main/java/com/github/libretube/ui/fragments/AudioPlayerFragment.kt index 9ce97c4dc..a8d2fd4f0 100644 --- a/app/src/main/java/com/github/libretube/ui/fragments/AudioPlayerFragment.kt +++ b/app/src/main/java/com/github/libretube/ui/fragments/AudioPlayerFragment.kt @@ -399,11 +399,15 @@ class AudioPlayerFragment : Fragment(), AudioPlayerOptions { } override fun onSwipe(distanceY: Float) { + if (!PlayerHelper.swipeGestureEnabled) return + binding.volumeControls.isVisible = true updateVolume(distanceY) } override fun onSwipeEnd() { + if (!PlayerHelper.swipeGestureEnabled) return + binding.volumeControls.isGone = true }