Dragging vs context menu vs selection vs ctrl
This commit is contained in:
@ -59,15 +59,17 @@ export function dragEnd(){
|
||||
return { type: 'DRAG_END' }
|
||||
}
|
||||
|
||||
export function reorderPlaylistTracks( uri, indexes, to_index ){
|
||||
export function reorderPlaylistTracks( uri, indexes, to_index, snapshot_id = false ){
|
||||
switch( helpers.uriSource( uri ) ){
|
||||
|
||||
case 'spotify':
|
||||
// TODO: handle bunched selected tracks (ie non-continuious indexes)
|
||||
return {
|
||||
type: 'SPOTIFY_REORDER_PLAYLIST_TRACKS',
|
||||
uri: uri,
|
||||
indexes: indexes,
|
||||
to_index: to_index
|
||||
to_index: to_index,
|
||||
snapshot_id: snapshot_id
|
||||
}
|
||||
|
||||
case 'm3u':
|
||||
|
||||
@ -233,13 +233,13 @@ export default function reducer(ui = {}, action){
|
||||
case 'PLAYLIST_TRACKS_LOADED':
|
||||
var playlist = Object.assign({}, ui.playlist, { tracks: action.tracks })
|
||||
return Object.assign({}, ui, { playlist: playlist });
|
||||
|
||||
/*
|
||||
case 'PLAYLIST_TRACKS_REORDERED':
|
||||
var snapshot_id = null
|
||||
if( action.snapshot_id ) snapshot_id = action.snapshot_id
|
||||
var playlist = Object.assign({}, ui.playlist, { tracks: action.tracks, snapshot_id: snapshot_id })
|
||||
return Object.assign({}, ui, { playlist: playlist });
|
||||
|
||||
*/
|
||||
|
||||
/**
|
||||
* Library Playlists
|
||||
|
||||
Reference in New Issue
Block a user