mirror of
https://github.com/navidrome/navidrome.git
synced 2025-04-26 00:12:19 +03:00
Unselect album songs after clicking on bulk "Play Later" button
This commit is contained in:
parent
0ee000a8a0
commit
a8d3466b0e
@ -10,7 +10,7 @@ import { useDispatch } from 'react-redux'
|
|||||||
import { addTracks } from '../audioplayer'
|
import { addTracks } from '../audioplayer'
|
||||||
import AddToQueueIcon from '@material-ui/icons/AddToQueue'
|
import AddToQueueIcon from '@material-ui/icons/AddToQueue'
|
||||||
|
|
||||||
const AddToQueueButton = ({ selectedIds }) => {
|
const AddToQueueButton = ({ resource, selectedIds }) => {
|
||||||
const dispatch = useDispatch()
|
const dispatch = useDispatch()
|
||||||
const translate = useTranslate()
|
const translate = useTranslate()
|
||||||
const dataProvider = useDataProvider()
|
const dataProvider = useDataProvider()
|
||||||
@ -19,7 +19,7 @@ const AddToQueueButton = ({ selectedIds }) => {
|
|||||||
|
|
||||||
const addToQueue = () => {
|
const addToQueue = () => {
|
||||||
dataProvider
|
dataProvider
|
||||||
.getMany('song', { ids: selectedIds })
|
.getMany(resource, { ids: selectedIds })
|
||||||
.then((response) => {
|
.then((response) => {
|
||||||
// Add tracks to a map for easy lookup by ID, needed for the next step
|
// Add tracks to a map for easy lookup by ID, needed for the next step
|
||||||
const tracks = response.data.reduce(
|
const tracks = response.data.reduce(
|
||||||
@ -32,7 +32,7 @@ const AddToQueueButton = ({ selectedIds }) => {
|
|||||||
.catch(() => {
|
.catch(() => {
|
||||||
notify('ra.page.error', 'warning')
|
notify('ra.page.error', 'warning')
|
||||||
})
|
})
|
||||||
unselectAll('song')
|
unselectAll(resource)
|
||||||
}
|
}
|
||||||
|
|
||||||
return (
|
return (
|
||||||
|
Loading…
x
Reference in New Issue
Block a user