Seek to start of song when nexting (progress cache would remain at the progress of the previous track.

housekeeping/remove-warnings
Antoine POPINEAU 2020-05-30 17:49:08 +02:00
rodzic 3180c886a2
commit 3fb0bb55a4
Nie znaleziono w bazie danych klucza dla tego podpisu
ID klucza GPG: A78AC64694F84063
1 zmienionych plików z 6 dodań i 1 usunięć

Wyświetl plik

@ -177,7 +177,12 @@ class PlayerService : Service() {
is Command.ToggleState -> toggle()
is Command.SetState -> state(message.state)
is Command.NextTrack -> player.next()
is Command.NextTrack -> {
player.next()
Cache.set(this@PlayerService, "progress", "0".toByteArray())
ProgressBus.send(0, 0, 0)
}
is Command.PreviousTrack -> previousTrack()
is Command.Seek -> progress(message.progress)