Removing spotify connected status - we connect on demand instead

This commit is contained in:
James Barnsley
2018-04-01 11:52:42 +12:00
parent 9ecddcc1b5
commit 407a2d3a10
12 changed files with 22 additions and 129 deletions

View File

@ -141,7 +141,6 @@ function refreshToken(dispatch, getState){
resolve(response)
},
(xhr, status, error) => {
dispatch({ type: 'SPOTIFY_DISCONNECTED' })
reject({
config: config,
xhr: xhr,
@ -164,7 +163,6 @@ function refreshToken(dispatch, getState){
.then(
(response, status, xhr) => {
if (response.error){
dispatch({ type: 'SPOTIFY_DISCONNECTED' })
reject({
config: config,
xhr: xhr,
@ -186,7 +184,6 @@ function refreshToken(dispatch, getState){
},
(xhr, status, error) => {
dispatch({ type: 'SPOTIFY_DISCONNECTED' })
reject({
config: config,
xhr: xhr,
@ -269,14 +266,12 @@ export function getMe(){
type: 'SPOTIFY_ME_LOADED',
data: response
});
dispatch({ type: 'SPOTIFY_CONNECTED' });
},
error => {
dispatch(coreActions.handleException(
'Could not load your profile',
error
));
dispatch({ type: 'SPOTIFY_DISCONNECTED' });
}
);
}