Refactor album actions, simplify usage

This commit is contained in:
Deluan
2020-05-07 11:24:28 -04:00
parent 16f2b056ef
commit 06ab88415a
6 changed files with 35 additions and 24 deletions
+1 -1
View File
@@ -27,7 +27,7 @@ const AddToQueueButton = ({ resource, selectedIds }) => {
{}
)
// Add the tracks to the queue in the selection order
dispatch(addTracks(selectedIds.map((id) => tracks[id])))
dispatch(addTracks(tracks, selectedIds))
})
.catch(() => {
notify('ra.page.error', 'warning')
+1 -1
View File
@@ -16,7 +16,7 @@ export const SongContextMenu = ({ record }) => {
},
addToQueue: {
label: translate('resources.song.actions.addToQueue'),
action: (record) => addTracks([record]),
action: (record) => addTracks({ [record.id]: record }),
},
}