Lazy loading cleanup
This commit is contained in:
@ -461,13 +461,10 @@ const CoreMiddleware = (function(){
|
||||
break;
|
||||
|
||||
case 'LOAD_USER':
|
||||
|
||||
console.log(action);
|
||||
|
||||
if (
|
||||
!action.force_reload &&
|
||||
store.getState().core.playlists[action.uri] &&
|
||||
store.getState().core.playlists[action.uri].albums_uris ){
|
||||
store.getState().core.users[action.uri] &&
|
||||
store.getState().core.users[action.uri].playlists_uris ){
|
||||
console.info('Loading "'+action.uri+'" from index');
|
||||
break;
|
||||
}
|
||||
@ -487,6 +484,14 @@ const CoreMiddleware = (function(){
|
||||
break;
|
||||
|
||||
case 'LOAD_USER_PLAYLISTS':
|
||||
if (
|
||||
!action.force_reload &&
|
||||
store.getState().core.users[action.uri] &&
|
||||
store.getState().core.users[action.uri].playlists_uris ){
|
||||
console.info('Loading "'+action.uri+'" playlists from index');
|
||||
break;
|
||||
}
|
||||
|
||||
switch (helpers.uriSource(action.uri)){
|
||||
case 'spotify':
|
||||
store.dispatch(spotifyActions.getUserPlaylists(action.uri));
|
||||
|
||||
@ -1273,7 +1273,7 @@ export function getUserPlaylists(uri){
|
||||
playlists.push(playlist);
|
||||
}
|
||||
|
||||
dispatch(coreActions.userPlaylistsLoaded(uri, playlists, response.more, response.total));
|
||||
dispatch(coreActions.userPlaylistsLoaded(uri, playlists, response.next, response.total));
|
||||
},
|
||||
error => {
|
||||
dispatch(coreActions.handleException(
|
||||
|
||||
Reference in New Issue
Block a user