Gaëtan Renaudeau
7 years ago
committed by
GitHub
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with
7 additions and
4 deletions
-
src/components/EnsureDeviceApp/index.js
-
src/renderer/init.js
|
|
@ -89,6 +89,8 @@ class EnsureDeviceApp extends PureComponent<Props, State> { |
|
|
|
|
|
|
|
if (prevDeviceSelected !== deviceSelected) { |
|
|
|
this.handleStatusChange('connected', 'progress') |
|
|
|
// TODO: refacto to more generic/global way
|
|
|
|
clearTimeout(this._timeout) |
|
|
|
this._timeout = setTimeout(this.checkAppOpened, 250) |
|
|
|
} |
|
|
|
} |
|
|
@ -148,7 +150,10 @@ class EnsureDeviceApp extends PureComponent<Props, State> { |
|
|
|
this.handleStatusChange(this.state.deviceStatus, 'fail', e.message) |
|
|
|
} |
|
|
|
|
|
|
|
this._timeout = setTimeout(this.checkAppOpened, 1e3) |
|
|
|
// TODO: refacto to more generic/global way
|
|
|
|
if (!this._unmounted) { |
|
|
|
this._timeout = setTimeout(this.checkAppOpened, 1e3) |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
_timeout: * |
|
|
|
|
|
@ -37,9 +37,7 @@ const store = createStore({ history, dbMiddleware }) |
|
|
|
const rootNode = document.getElementById('app') |
|
|
|
|
|
|
|
const settings = db.get('settings') |
|
|
|
if (Object.keys(settings).length !== 0) { |
|
|
|
store.dispatch(fetchSettings(settings)) |
|
|
|
} |
|
|
|
store.dispatch(fetchSettings(settings)) |
|
|
|
|
|
|
|
const countervaluesData = db.get('countervalues') |
|
|
|
if (countervaluesData) { |
|
|
|