mirror of
https://github.com/libre-tube/LibreTube.git
synced 2025-04-27 23:40:33 +05:30
Refactors keepScreenOn method
This commit is contained in:
parent
6795026a94
commit
2fcaea9ad6
@ -172,7 +172,9 @@ internal class CustomExoPlayerView(
|
||||
)
|
||||
) {
|
||||
updatePlayPauseButton()
|
||||
updateScreenOnState()
|
||||
|
||||
// keep screen on if the video is playing
|
||||
keepScreenOn = player.isPlaying == true
|
||||
}
|
||||
}
|
||||
})
|
||||
@ -186,11 +188,6 @@ internal class CustomExoPlayerView(
|
||||
}
|
||||
}
|
||||
|
||||
private fun updateScreenOnState() {
|
||||
// keep screen on if the video is playing
|
||||
keepScreenOn = player?.isPlaying == true
|
||||
}
|
||||
|
||||
private fun updatePlayPauseButton() {
|
||||
binding.playPauseBTN.setImageResource(
|
||||
when {
|
||||
|
Loading…
x
Reference in New Issue
Block a user