mirror of
https://github.com/JustinZeus/Wholphin.git
synced 2026-07-08 15:50:16 +02:00
Fixes "Pause with one click" for MPV (#701)
## Description Fixes "Pause with one click" so the desired behavior isn't reversed and now shows the controls when pausing. This bug happened because MPV commands are async, so there is a tiny delay before the pausing occurs and the playback state is updated. However, the logic to decided whether to show the controls or not checks the playback state immediately. ### Related issues Fixes #697
This commit is contained in:
parent
d725821011
commit
3215326515
1 changed files with 2 additions and 1 deletions
|
|
@ -45,8 +45,9 @@ class PlaybackKeyHandler(
|
|||
player.seekForward(seekForward)
|
||||
updateSkipIndicator(seekForward.inWholeMilliseconds)
|
||||
} else if (oneClickPause && isEnterKey(it)) {
|
||||
val wasPlaying = player.isPlaying
|
||||
Util.handlePlayPauseButtonAction(player)
|
||||
if (!player.isPlaying) {
|
||||
if (wasPlaying) {
|
||||
controllerViewState.showControls()
|
||||
} else {
|
||||
skipBackOnResume?.let {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue