New: Add/remove individual albums

This commit is contained in:
ta264 2019-12-16 21:21:32 +00:00 committed by Qstick
parent 8da53ae6aa
commit 0bde5fd9e5
128 changed files with 2796 additions and 743 deletions

View file

@ -176,12 +176,20 @@ class SignalRConnector extends Component {
}
handleAlbum = (body) => {
if (body.action === 'updated') {
const action = body.action;
const section = 'albums';
if (action === 'updated') {
this.props.dispatchUpdateItem({
section: 'albums',
section,
updateOnly: true,
...body.resource
});
} else if (action === 'deleted') {
this.props.dispatchRemoveItem({
section,
id: body.resource.id
});
}
}