Merge branch 'KeithScheiwiller-master' into develop
This commit is contained in:
File diff suppressed because it is too large
Load Diff
@ -307,6 +307,16 @@ export default function reducer(spotify = {}, action){
|
||||
}
|
||||
return Object.assign({}, spotify, { library_playlists: items });
|
||||
|
||||
case 'SPOTIFY_LIBRARY_TRACK_CHECK':
|
||||
var items = Object.assign([], spotify.library_tracks)
|
||||
var index = items.indexOf(action.key)
|
||||
if (index > -1 && !action.in_library) {
|
||||
items.splice(index, 1)
|
||||
} else if (index < 0 && action.in_library){
|
||||
items.push(action.key)
|
||||
}
|
||||
return Object.assign({}, spotify, { library_tracks: items });
|
||||
|
||||
|
||||
/**
|
||||
* Searching
|
||||
|
||||
@ -46,7 +46,9 @@ class LibraryTracks extends React.Component{
|
||||
}
|
||||
|
||||
render(){
|
||||
if (helpers.isLoading(this.props.load_queue,['spotify_me/tracks'])){
|
||||
|
||||
// Note trailing "?" makes sure our context menu in_library checks doesn't interfere
|
||||
if (helpers.isLoading(this.props.load_queue,['spotify_me/tracks?'])){
|
||||
return (
|
||||
<div className="view library-tracks-view">
|
||||
<Header icon="music" title="My tracks" />
|
||||
|
||||
Reference in New Issue
Block a user