inLibrary() instead of is_following for all library items - need to handle initial loads

This commit is contained in:
James Barnsley
2017-03-09 21:37:16 +13:00
parent a8a47b86a9
commit 3ad2bcd9fb
7 changed files with 88 additions and 55 deletions

View File

@ -487,10 +487,11 @@ export function following(uri, method = 'GET'){
.then( response => {
if( response ) is_following = response
if( typeof(is_following) === 'object' ) is_following = is_following[0]
dispatch({
type: 'SPOTIFY_'+asset_name.toUpperCase()+'_FOLLOWING_LOADED',
type: asset_name.toUpperCase()+'_LIBRARY_CHECK',
key: uri,
is_following: is_following
in_library: is_following
});
});
}