show incompatible daemon modal before anything else
This commit is contained in:
parent
b9c4e6ffdd
commit
c9c1fdbb19
1 changed files with 12 additions and 8 deletions
|
@ -52,7 +52,12 @@ export class SplashScreen extends React.PureComponent<Props, State> {
|
||||||
|
|
||||||
this.adjustErrorTimeout();
|
this.adjustErrorTimeout();
|
||||||
Lbry.connect()
|
Lbry.connect()
|
||||||
.then(checkDaemonVersion)
|
.then(() => {
|
||||||
|
this.setState({
|
||||||
|
isRunning: true,
|
||||||
|
});
|
||||||
|
checkDaemonVersion();
|
||||||
|
})
|
||||||
.then(() => {
|
.then(() => {
|
||||||
this.updateStatus();
|
this.updateStatus();
|
||||||
})
|
})
|
||||||
|
@ -89,10 +94,13 @@ export class SplashScreen extends React.PureComponent<Props, State> {
|
||||||
}
|
}
|
||||||
|
|
||||||
updateStatus() {
|
updateStatus() {
|
||||||
|
const { daemonVersionMatched } = this.props;
|
||||||
|
if (daemonVersionMatched) {
|
||||||
Lbry.status().then(status => {
|
Lbry.status().then(status => {
|
||||||
this.updateStatusCallback(status);
|
this.updateStatusCallback(status);
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
updateStatusCallback(status: Status) {
|
updateStatusCallback(status: Status) {
|
||||||
const { notifyUnlockWallet, authenticate } = this.props;
|
const { notifyUnlockWallet, authenticate } = this.props;
|
||||||
|
@ -119,10 +127,6 @@ export class SplashScreen extends React.PureComponent<Props, State> {
|
||||||
clearTimeout(this.timeout);
|
clearTimeout(this.timeout);
|
||||||
}
|
}
|
||||||
|
|
||||||
this.setState({
|
|
||||||
isRunning: true,
|
|
||||||
});
|
|
||||||
|
|
||||||
if (launchedModal === false) {
|
if (launchedModal === false) {
|
||||||
this.setState({ launchedModal: true }, () => notifyUnlockWallet());
|
this.setState({ launchedModal: true }, () => notifyUnlockWallet());
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue