playback: fix state restore

Wasn't using the corrected shuffle mapping
This commit is contained in:
Alexander Capehart 2024-01-16 13:25:03 -07:00
parent ec61ba50ec
commit e6141b12e6
No known key found for this signature in database
GPG key ID: 37DBE3621FE9AD47

View file

@ -766,12 +766,12 @@ class PlaybackStateManagerImpl @Inject constructor() : PlaybackStateManager {
val rawQueue = val rawQueue =
RawQueue( RawQueue(
heap = heap, heap = heap,
shuffledMapping = savedState.shuffledMapping, shuffledMapping = shuffledMapping,
heapIndex = heapIndex =
if (savedState.shuffledMapping.isNotEmpty()) { if (shuffledMapping.isNotEmpty()) {
savedState.shuffledMapping[savedState.index] shuffledMapping[savedState.index]
} else { } else {
savedState.index index
}) })
val oldStateMirror = stateMirror val oldStateMirror = stateMirror