mirror of
https://github.com/jeffvli/sonixd.git
synced 2026-04-30 11:12:36 -04:00
Fix move to bottom using index on context menu
This commit is contained in:
@@ -439,10 +439,17 @@ export const GlobalContextMenu = () => {
|
||||
const handleMoveSelectedToIndex = () => {
|
||||
if (misc.contextMenu.type === 'nowPlaying') {
|
||||
const currentEntryList = getCurrentEntryList(playQueue);
|
||||
const uniqueIdOfIndexToMoveTo = playQueue[currentEntryList][indexToMoveTo].uniqueId;
|
||||
dispatch(
|
||||
moveToIndex({ entries: multiSelect.selected, moveBeforeId: uniqueIdOfIndexToMoveTo })
|
||||
);
|
||||
|
||||
if (Number(indexToMoveTo) === playQueue[currentEntryList].length) {
|
||||
dispatch(moveToBottom({ selectedEntries: multiSelect.selected }));
|
||||
} else {
|
||||
const uniqueIdOfIndexToMoveTo = playQueue[currentEntryList][indexToMoveTo].uniqueId;
|
||||
dispatch(
|
||||
moveToIndex({ entries: multiSelect.selected, moveBeforeId: uniqueIdOfIndexToMoveTo })
|
||||
);
|
||||
}
|
||||
} else if (Number(indexToMoveTo) === playlist.entry.length) {
|
||||
dispatch(plMoveToBottom({ selectedEntries: multiSelect.selected }));
|
||||
} else {
|
||||
const uniqueIdOfIndexToMoveTo = playlist.entry[indexToMoveTo].uniqueId;
|
||||
dispatch(
|
||||
|
||||
Reference in New Issue
Block a user