diff --git a/app/src/main/java/eu/kanade/tachiyomi/ui/player/Gestures.kt b/app/src/main/java/eu/kanade/tachiyomi/ui/player/Gestures.kt index 0446b0027..015b78364 100644 --- a/app/src/main/java/eu/kanade/tachiyomi/ui/player/Gestures.kt +++ b/app/src/main/java/eu/kanade/tachiyomi/ui/player/Gestures.kt @@ -98,6 +98,7 @@ class Gestures( if (scrollState == STATE_HORIZONTAL) { scrollDiff?.let { activity.horizontalScroll(it, final = true) } scrollDiff = null + activity.playerControls.resetControlsFade() } if (scrollState != STATE_UP) { scrollState = STATE_UP diff --git a/app/src/main/java/eu/kanade/tachiyomi/ui/player/PlayerActivity.kt b/app/src/main/java/eu/kanade/tachiyomi/ui/player/PlayerActivity.kt index 9bdde7d8a..388866f63 100644 --- a/app/src/main/java/eu/kanade/tachiyomi/ui/player/PlayerActivity.kt +++ b/app/src/main/java/eu/kanade/tachiyomi/ui/player/PlayerActivity.kt @@ -259,15 +259,15 @@ class PlayerActivity : private var playerIsDestroyed = true - internal var subTracks: Array = emptyArray() + private var subTracks: Array = emptyArray() - internal var selectedSub = 0 + private var selectedSub = 0 private var hadPreviousSubs = false - internal var audioTracks: Array = emptyArray() + private var audioTracks: Array = emptyArray() - internal var selectedAudio = 0 + private var selectedAudio = 0 private var hadPreviousAudio = false @@ -541,7 +541,7 @@ class PlayerActivity : showLoadingIndicator(position >= cachePosition && seeking) } - internal fun setSub(index: Int) { + private fun setSub(index: Int) { if (selectedSub == index || selectedSub > subTracks.lastIndex) return selectedSub = index if (index == 0) { @@ -557,7 +557,7 @@ class PlayerActivity : ?: MPVLib.command(arrayOf("sub-add", subTracks[index].url, "select", subTracks[index].url)) } - internal fun setAudio(index: Int) { + private fun setAudio(index: Int) { if (selectedAudio == index || selectedAudio > audioTracks.lastIndex) return selectedAudio = index if (index == 0) { @@ -810,6 +810,7 @@ class PlayerActivity : fun initSeek() { initialSeek = player.timePos ?: -1 } + fun horizontalScroll(diff: Float, final: Boolean = false) { // disable seeking when timePos is not available val duration = player.duration ?: 0