Play/queue actions on playlist save tracks to index for faster reuse

This commit is contained in:
James Barnsley
2020-06-12 22:42:49 +12:00
parent 7be693dea3
commit 7f9e2eeaf5
6 changed files with 87 additions and 72 deletions

View File

@ -43,8 +43,8 @@ const UIMiddleware = (function () {
case 'OPEN_MODAL':
if (store.getState().ui.allow_reporting) {
ReactGA.event({ category: 'Modal', action: 'Opened', label: action.modal.name });
}
ReactGA.event({ category: 'Modal', action: 'Opened', label: action.modal.name });
}
$('body').addClass('modal-open');
store.dispatch(uiActions.hideContextMenu());
store.dispatch(uiActions.hideTouchContextMenu());
@ -87,7 +87,7 @@ const UIMiddleware = (function () {
var notification = window.Notification || window.mozNotification || window.webkitNotification;
if (typeof notification === 'undefined') return false;
if (typeof notification !== 'undefined') notification.requestPermission((permission) => {});
if (typeof notification !== 'undefined') notification.requestPermission((permission) => { });
// handle nested data objects
var data = {};

View File

@ -157,7 +157,7 @@ export default function reducer(ui = {}, action) {
var status = 'running';
if (last_run) {
var data = { ...last_run.data, ...action.data };
status = last_run.status;
if (action.type === 'UPDATE_PROCESS') status = last_run.status;
} else {
var { data } = action;
}