fix: defer board+port state update for extensions

If it is set before the board+port settings are restored from the
`localStorage`, extensions will see no board+port.

Ref: arduino/arduino-ide#2165
Ref: dankeboy36/esp-exception-decoder#10

Signed-off-by: Akos Kitta <a.kitta@arduino.cc>
This commit is contained in:
Akos Kitta 2023-09-21 15:00:11 +02:00 committed by Akos Kitta
parent ec28623a97
commit 9f48296d4d

View File

@ -76,7 +76,9 @@ export class UpdateArduinoState extends SketchContribution {
}
override onReady(): void {
this.updateBoardsConfig(this.boardsServiceProvider.boardsConfig); // TODO: verify!
this.boardsServiceProvider.ready.then(() => {
this.updateBoardsConfig(this.boardsServiceProvider.boardsConfig);
});
this.updateSketchPath(this.sketchServiceClient.tryGetCurrentSketch());
this.updateUserDirPath(this.configService.tryGetSketchDirUri());
this.updateDataDirPath(this.configService.tryGetDataDirUri());