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:
1 parent
17bda94bfc
commit
14bebced10
1 file changed
+2
-1
@@ -808,7 +808,6 @@ class AppStore(
|
|||||||
}
|
}
|
||||||
|
|
||||||
private fun restartCurrent(song: Song) {
|
private fun restartCurrent(song: Song) {
|
||||||
reportCurrentProgress(completed = false)
|
|
||||||
if (player.canSeek) {
|
if (player.canSeek) {
|
||||||
player.seekTo(0.0)
|
player.seekTo(0.0)
|
||||||
_state.update { it.copy(positionSeconds = 0.0) }
|
_state.update { it.copy(positionSeconds = 0.0) }
|
||||||
@@ -816,6 +815,8 @@ class AppStore(
|
|||||||
_state.update { it.copy(playing = true, positionSeconds = 0.0) }
|
_state.update { it.copy(playing = true, positionSeconds = 0.0) }
|
||||||
startSong(song)
|
startSong(song)
|
||||||
}
|
}
|
||||||
|
// Persist the restarted position for long-form right away.
|
||||||
|
reportCurrentProgress(completed = false)
|
||||||
}
|
}
|
||||||
|
|
||||||
fun seekTo(seconds: Double) {
|
fun seekTo(seconds: Double) {
|
||||||
|
|||||||
Reference in new issue
Block a user