From 3215326515ab96ecadac0852a60a3807135723ba Mon Sep 17 00:00:00 2001 From: Ray <154766448+damontecres@users.noreply.github.com> Date: Wed, 14 Jan 2026 17:06:40 -0500 Subject: [PATCH] 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 --- .../damontecres/wholphin/ui/playback/PlaybackKeyHandler.kt | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/app/src/main/java/com/github/damontecres/wholphin/ui/playback/PlaybackKeyHandler.kt b/app/src/main/java/com/github/damontecres/wholphin/ui/playback/PlaybackKeyHandler.kt index c95b0896..f10a0758 100644 --- a/app/src/main/java/com/github/damontecres/wholphin/ui/playback/PlaybackKeyHandler.kt +++ b/app/src/main/java/com/github/damontecres/wholphin/ui/playback/PlaybackKeyHandler.kt @@ -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 {