Loading follow status correctly; unfollow removes from library but not state, effectively fixing #678

This commit is contained in:
James Barnsley
2021-04-12 21:29:43 +12:00
parent dd4fe089d6
commit 69583494ea
6 changed files with 35 additions and 41 deletions

View File

@ -65,17 +65,8 @@ const FollowButton = ({
);
}
const mapStateToProps = (state, ownProps) => {
const {
uri,
} = ownProps;
const loadingSelector = makeLoadingSelector([
'spotify_me/tracks?',
'spotify_me/albums?',
'spotify_me/following?',
`spotify_playlists/${getFromUri('playlistid', uri)}/followers?`,
]);
const mapStateToProps = (state) => {
const loadingSelector = makeLoadingSelector(['(.*)(follow)|(me\/albums)(.*)']);
return {
loading: loadingSelector(state),