fix: persist the restarted position for longform immediately
CI / build (push) Successful in 1m42s

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.
This commit is contained in:
TapTap committed 2026-11-15 17:13:08 +00:00
1 parent 17bda94bfc
commit 14bebced10
1 file changed
+2 -1
@@ -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) {