show incompatible daemon modal before anything else

This commit is contained in:
Sean Yesmunt 2018-12-04 17:39:27 -05:00
parent b9c4e6ffdd
commit c9c1fdbb19

View file

@ -52,7 +52,12 @@ export class SplashScreen extends React.PureComponent<Props, State> {
this.adjustErrorTimeout();
Lbry.connect()
.then(checkDaemonVersion)
.then(() => {
this.setState({
isRunning: true,
});
checkDaemonVersion();
})
.then(() => {
this.updateStatus();
})
@ -89,9 +94,12 @@ export class SplashScreen extends React.PureComponent<Props, State> {
}
updateStatus() {
Lbry.status().then(status => {
this.updateStatusCallback(status);
});
const { daemonVersionMatched } = this.props;
if (daemonVersionMatched) {
Lbry.status().then(status => {
this.updateStatusCallback(status);
});
}
}
updateStatusCallback(status: Status) {
@ -119,10 +127,6 @@ export class SplashScreen extends React.PureComponent<Props, State> {
clearTimeout(this.timeout);
}
this.setState({
isRunning: true,
});
if (launchedModal === false) {
this.setState({ launchedModal: true }, () => notifyUnlockWallet());
}