Sharing of configuration and other authorizations

This commit is contained in:
James Barnsley
2018-09-30 20:09:12 +13:00
parent 96359e0b42
commit 127a8322d0
26 changed files with 996 additions and 472 deletions

View File

@ -50,19 +50,16 @@ const SpotifyMiddleware = (function(){
break;
case 'SPOTIFY_IMPORT_AUTHORIZATION':
if (store.getState().ui.allow_reporting){
var hashed_username = null
if (store.getState().spotify.me){
hashed_username = md5(store.getState().spotify.me);
ReactGA.set({userId: hashed_username});
}
ReactGA.event({category: 'Spotify', action: 'Authorization imported', label: hashed_username});
}
// Flush out the previous user's library
store.dispatch(spotifyActions.flushLibrary());
// Pass to reducer
next(action);
// Then get the new user
store.dispatch(spotifyActions.getMe());
break;
case 'SPOTIFY_RECOMMENDATIONS_LOADED':