Service tiles; Start handling disabled services
This commit is contained in:
@ -171,11 +171,6 @@ function refreshToken( dispatch, getState ){
|
||||
})
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* Actions and Action Creators
|
||||
**/
|
||||
|
||||
export function setConfig( config ){
|
||||
return {
|
||||
type: 'SPOTIFY_SET_CONFIG',
|
||||
|
||||
@ -16,10 +16,21 @@ const SpotifyMiddleware = (function(){
|
||||
|
||||
switch(action.type){
|
||||
|
||||
case 'SPOTIFY_CONNECT':
|
||||
store.dispatch( spotifyActions.getMe() )
|
||||
break
|
||||
|
||||
case 'SPOTIFY_CONNECTED':
|
||||
var label = null
|
||||
if (store.getState().spotify.me) label = store.getState().spotify.me.id
|
||||
ReactGA.event({ category: 'Spotify', action: 'Connected', label: label })
|
||||
|
||||
// TODO: remove this so we don't tap out our API limits before we even get started
|
||||
// Perhaps fire this on demand? Context menu, playlists loading or AddToPlaylistModal
|
||||
if (store.getState().spotify_authorized){
|
||||
store.dispatch(spotifyActions.getAllLibraryPlaylists())
|
||||
}
|
||||
|
||||
next(action)
|
||||
break
|
||||
|
||||
@ -56,10 +67,6 @@ const SpotifyMiddleware = (function(){
|
||||
next(action)
|
||||
break
|
||||
|
||||
case 'SPOTIFY_CONNECT':
|
||||
store.dispatch( spotifyActions.getMe() )
|
||||
break
|
||||
|
||||
case 'SPOTIFY_CREATE_PLAYLIST':
|
||||
if( !store.getState().spotify.authorized ){
|
||||
store.dispatch( uiActions.createNotification( "Must be logged in to Spotify to do that", 'bad' ) )
|
||||
|
||||
Reference in New Issue
Block a user