From a8d3466b0e3abe4927e7fe93fc6a186e0080c140 Mon Sep 17 00:00:00 2001 From: Deluan Date: Tue, 5 May 2020 15:08:30 -0400 Subject: [PATCH] Unselect album songs after clicking on bulk "Play Later" button --- ui/src/song/AddToQueueButton.js | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/ui/src/song/AddToQueueButton.js b/ui/src/song/AddToQueueButton.js index 0b0456167..f2c949e1e 100644 --- a/ui/src/song/AddToQueueButton.js +++ b/ui/src/song/AddToQueueButton.js @@ -10,7 +10,7 @@ import { useDispatch } from 'react-redux' import { addTracks } from '../audioplayer' import AddToQueueIcon from '@material-ui/icons/AddToQueue' -const AddToQueueButton = ({ selectedIds }) => { +const AddToQueueButton = ({ resource, selectedIds }) => { const dispatch = useDispatch() const translate = useTranslate() const dataProvider = useDataProvider() @@ -19,7 +19,7 @@ const AddToQueueButton = ({ selectedIds }) => { const addToQueue = () => { dataProvider - .getMany('song', { ids: selectedIds }) + .getMany(resource, { ids: selectedIds }) .then((response) => { // Add tracks to a map for easy lookup by ID, needed for the next step const tracks = response.data.reduce( @@ -32,7 +32,7 @@ const AddToQueueButton = ({ selectedIds }) => { .catch(() => { notify('ra.page.error', 'warning') }) - unselectAll('song') + unselectAll(resource) } return (