playback: dont apply state mirror w/no song
Otherwise, the StateHolder will crash.
This commit is contained in:
parent
fbd8d4b361
commit
ced462e718
1 changed files with 2 additions and 2 deletions
|
@ -418,7 +418,7 @@ class PlaybackStateManagerImpl @Inject constructor() : PlaybackStateManager {
|
|||
}
|
||||
|
||||
this.stateHolder = stateHolder
|
||||
if (isInitialized) {
|
||||
if (isInitialized && stateMirror.index > -1) {
|
||||
stateHolder.applySavedState(stateMirror.parent, stateMirror.rawQueue, null)
|
||||
stateHolder.seekTo(stateMirror.progression.calculateElapsedPositionMs())
|
||||
stateHolder.playing(false)
|
||||
|
@ -753,7 +753,7 @@ class PlaybackStateManagerImpl @Inject constructor() : PlaybackStateManager {
|
|||
}
|
||||
|
||||
var index = savedState.index
|
||||
while (pointingAtSong() && index > -1) {
|
||||
while (!pointingAtSong() && index > -1) {
|
||||
index--
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue