|
@ -27,10 +27,8 @@ import { setRating, star, unstar } from '../../api/api'; |
|
|
import { useAppDispatch } from '../../redux/hooks'; |
|
|
import { useAppDispatch } from '../../redux/hooks'; |
|
|
import { |
|
|
import { |
|
|
fixPlayer2Index, |
|
|
fixPlayer2Index, |
|
|
setPlayQueue, |
|
|
|
|
|
setStar, |
|
|
setStar, |
|
|
sortPlayQueue, |
|
|
sortPlayQueue, |
|
|
updatePlayerIndices, |
|
|
|
|
|
} from '../../redux/playQueueSlice'; |
|
|
} from '../../redux/playQueueSlice'; |
|
|
import { StyledIconToggle, StyledRate } from '../shared/styled'; |
|
|
import { StyledIconToggle, StyledRate } from '../shared/styled'; |
|
|
import { addModalPage } from '../../redux/miscSlice'; |
|
|
import { addModalPage } from '../../redux/miscSlice'; |
|
@ -139,14 +137,12 @@ const ListViewTable = ({ |
|
|
? 'title' |
|
|
? 'title' |
|
|
: actualSortColumn.dataKey; |
|
|
: actualSortColumn.dataKey; |
|
|
|
|
|
|
|
|
// console.log(sortColumnDataKey);
|
|
|
|
|
|
dispatch( |
|
|
dispatch( |
|
|
sortPlayQueue({ |
|
|
sortPlayQueue({ |
|
|
columnDataKey: sortColumnDataKey, |
|
|
columnDataKey: sortColumnDataKey, |
|
|
sortType, |
|
|
sortType, |
|
|
}) |
|
|
}) |
|
|
); |
|
|
); |
|
|
dispatch(fixPlayer2Index()); |
|
|
|
|
|
} else { |
|
|
} else { |
|
|
// Clear the sortedEntry[]
|
|
|
// Clear the sortedEntry[]
|
|
|
dispatch( |
|
|
dispatch( |
|
@ -155,10 +151,20 @@ const ListViewTable = ({ |
|
|
sortType, |
|
|
sortType, |
|
|
}) |
|
|
}) |
|
|
); |
|
|
); |
|
|
dispatch(fixPlayer2Index()); |
|
|
|
|
|
} |
|
|
} |
|
|
} |
|
|
} |
|
|
}, [columns, dispatch, nowPlaying, sortColumn, sortType, sortedData]); |
|
|
if (playQueue.currentPlayer === 1) { |
|
|
|
|
|
dispatch(fixPlayer2Index()); |
|
|
|
|
|
} |
|
|
|
|
|
}, [ |
|
|
|
|
|
columns, |
|
|
|
|
|
dispatch, |
|
|
|
|
|
nowPlaying, |
|
|
|
|
|
playQueue.currentPlayer, |
|
|
|
|
|
sortColumn, |
|
|
|
|
|
sortType, |
|
|
|
|
|
sortedData, |
|
|
|
|
|
]); |
|
|
|
|
|
|
|
|
return ( |
|
|
return ( |
|
|
<> |
|
|
<> |
|
|