Loading me() when appropriate, fixes Spotify not authorized profile
This commit is contained in:
@ -19783,16 +19783,18 @@ var Parallax = function (_React$Component) {
|
|||||||
url: null
|
url: null
|
||||||
});
|
});
|
||||||
|
|
||||||
var self = this;
|
if (url && url !== "") {
|
||||||
var imageObject = new Image();
|
var self = this;
|
||||||
imageObject.src = url;
|
var imageObject = new Image();
|
||||||
|
imageObject.src = url;
|
||||||
|
|
||||||
imageObject.onload = function () {
|
imageObject.onload = function () {
|
||||||
self.setState({
|
self.setState({
|
||||||
loaded: true,
|
loaded: true,
|
||||||
url: url
|
url: url
|
||||||
});
|
});
|
||||||
};
|
};
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}, {
|
}, {
|
||||||
key: "render",
|
key: "render",
|
||||||
@ -75774,13 +75776,13 @@ var Services = function (_React$Component) {
|
|||||||
_createClass(Services, [{
|
_createClass(Services, [{
|
||||||
key: 'componentDidMount',
|
key: 'componentDidMount',
|
||||||
value: function componentDidMount() {
|
value: function componentDidMount() {
|
||||||
if (this.props.spotify.me && this.props.core.users[this.props.spotify.me.id] === undefined) {
|
if ((this.props.spotify.enabled || this.props.spotify.authorization) && (!this.props.spotify.me || this.props.core.users[this.props.spotify.me.id] === undefined)) {
|
||||||
this.props.spotifyActions.getMe();
|
this.props.spotifyActions.getMe();
|
||||||
}
|
}
|
||||||
if (this.props.lastfm.authorization && this.props.core.users["lastfm:user:" + this.props.lastfm.authorization.name] === undefined) {
|
if (this.props.lastfm.authorization && this.props.core.users["lastfm:user:" + this.props.lastfm.authorization.name] === undefined) {
|
||||||
this.props.lastfmActions.getMe();
|
this.props.lastfmActions.getMe();
|
||||||
}
|
}
|
||||||
if (this.props.genius.me && this.props.core.users["genius:user:" + this.props.genius.me.id] === undefined) {
|
if (this.props.genius.authorization && (!this.props.genius.me || this.props.core.users["genius:user:" + this.props.genius.me.id] === undefined)) {
|
||||||
this.props.geniusActions.getMe();
|
this.props.geniusActions.getMe();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
File diff suppressed because one or more lines are too long
@ -98,7 +98,7 @@
|
|||||||
|
|
||||||
// Release details
|
// Release details
|
||||||
// These are automatically injected to built HTML
|
// These are automatically injected to built HTML
|
||||||
var build = "1541031873";
|
var build = "1541039287";
|
||||||
var version = "3.29.2";
|
var version = "3.29.2";
|
||||||
|
|
||||||
// Construct the script tag
|
// Construct the script tag
|
||||||
|
|||||||
@ -34,15 +34,17 @@ export default class Parallax extends React.Component{
|
|||||||
url: null
|
url: null
|
||||||
});
|
});
|
||||||
|
|
||||||
var self = this;
|
if (url && url !== ""){
|
||||||
var imageObject = new Image();
|
var self = this;
|
||||||
imageObject.src = url;
|
var imageObject = new Image();
|
||||||
|
imageObject.src = url;
|
||||||
|
|
||||||
imageObject.onload = function(){
|
imageObject.onload = function(){
|
||||||
self.setState({
|
self.setState({
|
||||||
loaded: true,
|
loaded: true,
|
||||||
url: url
|
url: url
|
||||||
});
|
});
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@ -32,13 +32,13 @@ class Services extends React.Component{
|
|||||||
}
|
}
|
||||||
|
|
||||||
componentDidMount(){
|
componentDidMount(){
|
||||||
if (this.props.spotify.me && this.props.core.users[this.props.spotify.me.id] === undefined){
|
if ((this.props.spotify.enabled || this.props.spotify.authorization) && (!this.props.spotify.me || this.props.core.users[this.props.spotify.me.id] === undefined)){
|
||||||
this.props.spotifyActions.getMe();
|
this.props.spotifyActions.getMe();
|
||||||
}
|
}
|
||||||
if (this.props.lastfm.authorization && this.props.core.users["lastfm:user:"+this.props.lastfm.authorization.name] === undefined){
|
if (this.props.lastfm.authorization && this.props.core.users["lastfm:user:"+this.props.lastfm.authorization.name] === undefined){
|
||||||
this.props.lastfmActions.getMe();
|
this.props.lastfmActions.getMe();
|
||||||
}
|
}
|
||||||
if (this.props.genius.me && this.props.core.users["genius:user:"+this.props.genius.me.id] === undefined){
|
if (this.props.genius.authorization && (!this.props.genius.me || this.props.core.users["genius:user:"+this.props.genius.me.id] === undefined)){
|
||||||
this.props.geniusActions.getMe();
|
this.props.geniusActions.getMe();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user