From f3e24e4e9736e049123dd0754df8b05b067cc7e1 Mon Sep 17 00:00:00 2001 From: Jordan Eldredge Date: Sun, 21 Oct 2018 15:34:37 -0700 Subject: [PATCH] Actually dispatch playlist actions --- js/components/PlaylistWindow/index.tsx | 23 ++++++++++++----------- 1 file changed, 12 insertions(+), 11 deletions(-) diff --git a/js/components/PlaylistWindow/index.tsx b/js/components/PlaylistWindow/index.tsx index c877f222..3a43d433 100644 --- a/js/components/PlaylistWindow/index.tsx +++ b/js/components/PlaylistWindow/index.tsx @@ -189,18 +189,19 @@ class PlaylistWindow extends React.Component { const mapDispatchToProps = (dispatch: Dispatch): DispatchProps => { return { - focusPlaylist: () => ({ - type: SET_FOCUSED_WINDOW, - window: WINDOWS.PLAYLIST - }), - close: () => closeWindow("playlist"), - toggleShade: togglePlaylistShadeMode, - toggleVisualizerStyle, - scrollUpFourTracks, - scrollDownFourTracks, + focusPlaylist: () => + dispatch({ + type: SET_FOCUSED_WINDOW, + window: WINDOWS.PLAYLIST + }), + close: () => dispatch(closeWindow("playlist")), + toggleShade: () => dispatch(togglePlaylistShadeMode()), + toggleVisualizerStyle: () => dispatch(togglePlaylistShadeMode()), + scrollUpFourTracks: () => dispatch(scrollUpFourTracks()), + scrollDownFourTracks: () => dispatch(scrollDownFourTracks()), loadFilesFromReferences: (e, startIndex) => - loadFilesFromReferences(e.dataTransfer.files, null, startIndex), - scrollVolume + dispatch(loadFilesFromReferences(e.dataTransfer.files, null, startIndex)), + scrollVolume: e => dispatch(scrollVolume(e)) }; };