fix status being called continuosly after startup
This commit is contained in:
parent
4e70642163
commit
18c5743f89
1 changed files with 24 additions and 26 deletions
|
@ -130,18 +130,14 @@ export default class SplashScreen extends React.PureComponent<Props, State> {
|
|||
if (launchedModal === false && !modal) {
|
||||
this.setState({ launchedModal: true }, () => notifyUnlockWallet());
|
||||
}
|
||||
|
||||
// If we cleared the error timeout due to a wallet being locked, make sure to start it back up
|
||||
if (!this.timeout) {
|
||||
this.adjustErrorTimeout();
|
||||
}
|
||||
} else {
|
||||
Lbry.resolve({ urls: 'lbry://one' }).then(() => {
|
||||
return this.setState({ isRunning: true }, () => this.continueAppLaunch());
|
||||
return Lbry.resolve({ urls: 'lbry://one' }).then(() => {
|
||||
this.setState({ isRunning: true }, () => this.continueAppLaunch());
|
||||
});
|
||||
}
|
||||
});
|
||||
} else if (blockchainHeaders) {
|
||||
} else {
|
||||
if (blockchainHeaders) {
|
||||
const blockChainHeaders = blockchainHeaders;
|
||||
if (blockChainHeaders.download_progress < 100) {
|
||||
this.setState({
|
||||
|
@ -150,7 +146,8 @@ export default class SplashScreen extends React.PureComponent<Props, State> {
|
|||
});
|
||||
}
|
||||
} else if (wallet && wallet.blocks_behind > 0) {
|
||||
const amountBehind = wallet.blocks_behind === 1 ? '%amountBehind% block behind' : '%amountBehind% blocks behind';
|
||||
const amountBehind =
|
||||
wallet.blocks_behind === 1 ? '%amountBehind% block behind' : '%amountBehind% blocks behind';
|
||||
this.setState({
|
||||
message: __('Blockchain Sync'),
|
||||
details: `${__('Catching up...')} (${__(amountBehind, { amountBehind: wallet.blocks_behind })})`,
|
||||
|
@ -166,6 +163,7 @@ export default class SplashScreen extends React.PureComponent<Props, State> {
|
|||
this.updateStatus();
|
||||
}, 500);
|
||||
}
|
||||
}
|
||||
|
||||
runWithIncompatibleDaemon() {
|
||||
const { hideModal } = this.props;
|
||||
|
|
Loading…
Add table
Reference in a new issue