File tree Expand file tree Collapse file tree 1 file changed +6
-1
lines changed
arduino-ide-extension/src/browser/dialogs/firmware-uploader Expand file tree Collapse file tree 1 file changed +6
-1
lines changed Original file line number Diff line number Diff line change @@ -15,6 +15,7 @@ import {
15
15
} from '../../../common/protocol/arduino-firmware-uploader' ;
16
16
import { FirmwareUploaderComponent } from './firmware-uploader-component' ;
17
17
import { UploadFirmware } from '../../contributions/upload-firmware' ;
18
+ import { FrontendApplicationStateService } from '@theia/core/lib/browser/frontend-application-state' ;
18
19
19
20
@injectable ( )
20
21
export class UploadFirmwareDialogWidget extends ReactWidget {
@@ -24,6 +25,9 @@ export class UploadFirmwareDialogWidget extends ReactWidget {
24
25
@inject ( ArduinoFirmwareUploader )
25
26
protected readonly arduinoFirmwareUploader : ArduinoFirmwareUploader ;
26
27
28
+ @inject ( FrontendApplicationStateService )
29
+ private readonly appStatusService : FrontendApplicationStateService ;
30
+
27
31
protected updatableFqbns : string [ ] = [ ] ;
28
32
protected availableBoards : AvailableBoard [ ] = [ ] ;
29
33
protected isOpen = new Object ( ) ;
@@ -38,7 +42,8 @@ export class UploadFirmwareDialogWidget extends ReactWidget {
38
42
39
43
@postConstruct ( )
40
44
protected init ( ) : void {
41
- this . arduinoFirmwareUploader . updatableBoards ( ) . then ( ( fqbns ) => {
45
+ this . appStatusService . reachedState ( 'ready' ) . then ( async ( ) => {
46
+ const fqbns = await this . arduinoFirmwareUploader . updatableBoards ( ) ;
42
47
this . updatableFqbns = fqbns ;
43
48
this . update ( ) ;
44
49
} ) ;
You can’t perform that action at this time.
0 commit comments