Browse Source
LL-832 remove flashing screen in repair tool
gre-patch-1
Valentin D. Pinkman
6 years ago
No known key found for this signature in database
GPG Key ID: E7D110669FFB8D3E
1 changed files with
7 additions and
1 deletions
-
src/components/SettingsPage/RepairDeviceButton.js
|
@ -33,6 +33,12 @@ class RepairDeviceButton extends PureComponent<Props, State> { |
|
|
progress: 0, |
|
|
progress: 0, |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
componentWillUnmount() { |
|
|
|
|
|
if (this.timeout) { |
|
|
|
|
|
clearTimeout(this.timeout) |
|
|
|
|
|
} |
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
open = () => this.setState({ opened: true, error: null }) |
|
|
open = () => this.setState({ opened: true, error: null }) |
|
|
|
|
|
|
|
|
sub: * |
|
|
sub: * |
|
@ -45,7 +51,7 @@ class RepairDeviceButton extends PureComponent<Props, State> { |
|
|
repair = (version = null) => { |
|
|
repair = (version = null) => { |
|
|
if (this.state.isLoading) return |
|
|
if (this.state.isLoading) return |
|
|
const { push } = this.props |
|
|
const { push } = this.props |
|
|
this.setState({ isLoading: true }) |
|
|
this.timeout = setTimeout(() => this.setState({ isLoading: true }), 500) |
|
|
this.sub = firmwareRepair.send({ version }).subscribe({ |
|
|
this.sub = firmwareRepair.send({ version }).subscribe({ |
|
|
next: patch => { |
|
|
next: patch => { |
|
|
this.setState(patch) |
|
|
this.setState(patch) |
|
|