From 14bebced102f6f189b5abbf9a92eef2a68967549 Mon Sep 17 00:00:00 2001 From: TapTap Date: Sun, 15 Nov 2026 17:13:08 +0000 Subject: [PATCH] fix: persist the restarted position for longform immediately Pressing previous after two seconds now saves position zero before the next progress poll, so killing the app right after the restart keeps the right resume point. --- .../kotlin/win/taptap/musicmanager/client/store/AppStore.kt | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/composeApp/src/commonMain/kotlin/win/taptap/musicmanager/client/store/AppStore.kt b/composeApp/src/commonMain/kotlin/win/taptap/musicmanager/client/store/AppStore.kt index 3441599..f8a9032 100644 --- a/composeApp/src/commonMain/kotlin/win/taptap/musicmanager/client/store/AppStore.kt +++ b/composeApp/src/commonMain/kotlin/win/taptap/musicmanager/client/store/AppStore.kt @@ -808,7 +808,6 @@ class AppStore( } private fun restartCurrent(song: Song) { - reportCurrentProgress(completed = false) if (player.canSeek) { player.seekTo(0.0) _state.update { it.copy(positionSeconds = 0.0) } @@ -816,6 +815,8 @@ class AppStore( _state.update { it.copy(playing = true, positionSeconds = 0.0) } startSong(song) } + // Persist the restarted position for long-form right away. + reportCurrentProgress(completed = false) } fun seekTo(seconds: Double) {