[READ-ONLY] Mirror of https://github.com/probablykasper/ferrum. Music library app for Mac, Linux and Windows ferrum.kasper.space
electron linux macos music music-library music-player napi windows
0

Configure Feed

Select the types of activity you want to include in your feed.

Fix queue rearranging error

Kasper (Jan 19, 2023, 8:10 AM +0100) af5c16f6 14f05703

+5 -2
+3
CHANGELOG.md
··· 1 1 # Changelog 2 2 3 + ## Next 4 + - Fix error when rearranging many tracks in the queue 5 + 3 6 ## 0.16.4 - 2022 Jan 7 4 7 - Fix media key shortcuts 5 8
+2 -2
src/lib/queue.ts
··· 151 151 export function moveIndexes(indexes: number[], newIndex: number, top = false) { 152 152 const ids: QueueItem[] = [] 153 153 queue.update((q) => { 154 - // we need to remove the last indexes first to not mess up the indexes 155 - for (const index of indexes.sort().reverse()) { 154 + // Sort descending. We need to remove the last indexes first to not mess up the indexes 155 + for (const index of indexes.sort((a, b) => b - a)) { 156 156 ids.push(removeIndex(q, index)) 157 157 if (index < newIndex) { 158 158 newIndex--