Follow button loader
This commit is contained in:
@ -136,7 +136,7 @@ export class Album extends React.Component {
|
||||
if (!this.props.album) {
|
||||
if (
|
||||
helpers.isLoading(this.props.load_queue, [
|
||||
`spotify_GET_albums/${helpers.getFromUri('albumid', this.props.uri)}`,
|
||||
`spotify_albums/${helpers.getFromUri('albumid', this.props.uri)}`,
|
||||
])
|
||||
) {
|
||||
return <Loader body loading />;
|
||||
|
||||
@ -361,7 +361,7 @@ class Artist extends React.Component {
|
||||
const scheme = helpers.uriSource(this.props.uri);
|
||||
|
||||
if (!this.props.artist) {
|
||||
if (helpers.isLoading(this.props.load_queue, [`spotify_GET_artists/${helpers.getFromUri('artistid', this.props.uri)}`, 'lastfm_method=artist.getInfo'])) {
|
||||
if (helpers.isLoading(this.props.load_queue, [`spotify_artists/${helpers.getFromUri('artistid', this.props.uri)}`, 'lastfm_method=artist.getInfo'])) {
|
||||
return <Loader body loading />;
|
||||
}
|
||||
return (
|
||||
|
||||
@ -175,7 +175,7 @@ class Playlist extends React.Component {
|
||||
const playlist_id = helpers.getFromUri('playlistid', this.props.uri);
|
||||
|
||||
if (!this.props.playlist) {
|
||||
if (helpers.isLoading(this.props.load_queue, [`spotify_GET_playlists/${playlist_id}?`])) {
|
||||
if (helpers.isLoading(this.props.load_queue, [`spotify_playlists/${playlist_id}?`])) {
|
||||
return <Loader body loading />
|
||||
}
|
||||
return (
|
||||
|
||||
@ -183,7 +183,7 @@ class Track extends React.Component {
|
||||
}
|
||||
|
||||
render() {
|
||||
if (helpers.isLoading(this.props.load_queue, [`spotify_GET_track/${helpers.getFromUri('trackid', this.props.uri)}`])) {
|
||||
if (helpers.isLoading(this.props.load_queue, [`spotify_track/${helpers.getFromUri('trackid', this.props.uri)}`])) {
|
||||
return <Loader body loading />
|
||||
}
|
||||
|
||||
|
||||
@ -69,7 +69,7 @@ class User extends React.Component {
|
||||
const user_id = helpers.getFromUri('userid', this.props.uri);
|
||||
|
||||
if (!this.props.user) {
|
||||
if (helpers.isLoading(this.props.load_queue, [`spotify_GET_users/${user_id}`, `spotify_GET_users/${user_id}/playlists/?`])) {
|
||||
if (helpers.isLoading(this.props.load_queue, [`spotify_users/${user_id}`, `spotify_users/${user_id}/playlists/?`])) {
|
||||
return <Loader body loading />
|
||||
}
|
||||
return (
|
||||
|
||||
@ -28,7 +28,7 @@ class DiscoverCategories extends React.Component {
|
||||
}
|
||||
|
||||
render() {
|
||||
if (helpers.isLoading(this.props.load_queue, ['spotify_GET_browse/categories'])) {
|
||||
if (helpers.isLoading(this.props.load_queue, ['spotify_browse/categories'])) {
|
||||
return (
|
||||
<div className="view discover-categories-view">
|
||||
<Header icon="grid" title="Genre / Mood" />
|
||||
|
||||
@ -63,7 +63,7 @@ class DiscoverCategory extends React.Component {
|
||||
}
|
||||
|
||||
render() {
|
||||
if (helpers.isLoading(this.props.load_queue, ['spotify_GET_browse/categories/'])) {
|
||||
if (helpers.isLoading(this.props.load_queue, ['spotify_browse/categories/'])) {
|
||||
return (
|
||||
<div className="view discover-categories-view">
|
||||
<Header>
|
||||
|
||||
@ -58,7 +58,7 @@ class DiscoverFeatured extends React.Component {
|
||||
}
|
||||
|
||||
render() {
|
||||
if (helpers.isLoading(this.props.load_queue, ['spotify_GET_browse/featured-playlists'])) {
|
||||
if (helpers.isLoading(this.props.load_queue, ['spotify_browse/featured-playlists'])) {
|
||||
return (
|
||||
<div className="view discover-featured-view preserve-3d">
|
||||
<Header className="overlay" uiActions={this.props.uiActions}>
|
||||
|
||||
@ -70,7 +70,7 @@ class DiscoverNewReleases extends React.Component {
|
||||
}
|
||||
|
||||
render() {
|
||||
if (helpers.isLoading(this.props.load_queue, ['spotify_GET_browse/new-releases'])) {
|
||||
if (helpers.isLoading(this.props.load_queue, ['spotify_browse/new-releases'])) {
|
||||
return (
|
||||
<div className="view discover-new-releases-view">
|
||||
<Header>
|
||||
|
||||
@ -476,7 +476,7 @@ class Discover extends React.Component {
|
||||
}
|
||||
|
||||
render() {
|
||||
const is_loading = helpers.isLoading(this.props.load_queue, ['spotify_GET_recommendations']);
|
||||
const is_loading = helpers.isLoading(this.props.load_queue, ['spotify_recommendations']);
|
||||
const addable_tunabilities = [];
|
||||
for (const key in this.state.tunabilities) {
|
||||
if (this.state.tunabilities.hasOwnProperty(key)) {
|
||||
|
||||
@ -46,7 +46,7 @@ class LibraryTracks extends React.Component {
|
||||
|
||||
render() {
|
||||
// Note trailing "?" makes sure our context menu in_library checks doesn't interfere
|
||||
if (helpers.isLoading(this.props.load_queue, ['spotify_GET_me/tracks?'])) {
|
||||
if (helpers.isLoading(this.props.load_queue, ['spotify_me/tracks?'])) {
|
||||
return (
|
||||
<div className="view library-tracks-view">
|
||||
<Header icon="music" title="My tracks" />
|
||||
|
||||
Reference in New Issue
Block a user