Revamping radio notifications; Radio current track

This commit is contained in:
James Barnsley
2018-04-01 21:26:42 +12:00
parent 407a2d3a10
commit fcbfc64ec6
27 changed files with 346 additions and 237 deletions

View File

@ -15,7 +15,9 @@ class DiscoverCategories extends React.Component{
}
componentDidMount(){
this.props.spotifyActions.getCategories();
if (!this.props.categories){
this.props.spotifyActions.getCategories();
}
}
render(){

View File

@ -16,7 +16,7 @@ class DiscoverCategory extends React.Component{
}
componentDidMount(){
this.loadCategory()
this.loadCategory();
}
componentWillReceiveProps(nextProps){
@ -26,7 +26,9 @@ class DiscoverCategory extends React.Component{
}
loadCategory(){
if (!this.props.category || !this.props.category.playlists_uris) this.props.spotifyActions.getCategory(this.props.params.id );
if (!this.props.category || !this.props.category.playlists_uris){
this.props.spotifyActions.getCategory(this.props.params.id);
}
}
loadMore(){

View File

@ -21,7 +21,9 @@ class DiscoverFeatured extends React.Component{
}
componentDidMount(){
this.props.spotifyActions.getFeaturedPlaylists();
if (!this.props.featured_playlists){
this.props.spotifyActions.getFeaturedPlaylists();
}
}
playPlaylist(e,playlist){

View File

@ -23,7 +23,9 @@ class DiscoverNewReleases extends React.Component{
}
componentDidMount(){
if (!this.props.new_releases) this.props.spotifyActions.getNewReleases();
if (!this.props.new_releases){
this.props.spotifyActions.getNewReleases();
}
}
loadMore(){