fix autohide

This commit is contained in:
firelight 2024-07-19 18:24:06 +02:00 committed by GitHub
parent 12de924559
commit 63465ed7a9
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
2 changed files with 10 additions and 0 deletions

View file

@ -728,6 +728,15 @@ open class FullScreenPlayer : AbstractPlayerFragment() {
private var currentTapIndex = 0
protected fun autoHide() {
currentTapIndex++
delayHide()
}
override fun playerStatusChanged() {
super.playerStatusChanged()
delayHide()
}
private fun delayHide() {
val index = currentTapIndex
playerBinding?.playerHolder?.postDelayed({
if (!isCurrentTouchValid && isShowing && index == currentTapIndex && player.getIsPlaying()) {

View file

@ -158,6 +158,7 @@ class GeneratorPlayer : FullScreenPlayer() {
}
override fun playerStatusChanged() {
super.playerStatusChanged()
if (player.getIsPlaying()) {
viewModel.forceClearCache = false
}