Browse Source

Fix song order on add (next) when shuffled

master
jeffvli 3 years ago
committed by Jeff
parent
commit
f61a6f240d
  1. 5
      src/redux/playQueueSlice.ts

5
src/redux/playQueueSlice.ts

@ -823,10 +823,11 @@ const playQueueSlice = createSlice({
if (action.payload.type === 'later') {
refreshedEntries.map((entry: any) => state.entry.push(entry));
} else {
const currentSongIndex = getCurrentEntryIndexByUID(state.entry, state.currentSongUniqueId);
state.entry = [
...state.entry.slice(0, state.currentIndex + 1),
...state.entry.slice(0, currentSongIndex + 1),
...refreshedEntries,
...state.entry.slice(state.currentIndex + 1),
...state.entry.slice(currentSongIndex + 1),
];
}

Loading…
Cancel
Save