From e5021959c3eb2c3f34c37c72dd6e7d5c9441ef4c Mon Sep 17 00:00:00 2001 From: tzugen Date: Fri, 8 Apr 2022 21:24:04 +0200 Subject: [PATCH] Fix a small bug in togglePlayPause() --- .../org/moire/ultrasonic/service/MediaPlayerController.kt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ultrasonic/src/main/kotlin/org/moire/ultrasonic/service/MediaPlayerController.kt b/ultrasonic/src/main/kotlin/org/moire/ultrasonic/service/MediaPlayerController.kt index 98bb9206..e3978c22 100644 --- a/ultrasonic/src/main/kotlin/org/moire/ultrasonic/service/MediaPlayerController.kt +++ b/ultrasonic/src/main/kotlin/org/moire/ultrasonic/service/MediaPlayerController.kt @@ -289,7 +289,7 @@ class MediaPlayerController( @Synchronized fun togglePlayPause() { if (playbackState == Player.STATE_IDLE) autoPlayStart = true - if (controller?.isPlaying == false) { + if (controller?.isPlaying == true) { controller?.pause() } else { controller?.play()