File tree 1 file changed +3
-5
lines changed
arduino-ide-extension/src/browser
1 file changed +3
-5
lines changed Original file line number Diff line number Diff line change @@ -33,11 +33,9 @@ export class EditorMode implements FrontendApplicationContribution {
33
33
shell . closeTabs ( area , ( { owner } ) => ! ( owner instanceof EditorWidget || owner instanceof OutputWidget ) ) ;
34
34
}
35
35
}
36
- // No `else`. We initialize the views (if required) in `this.onStart`.
37
- // `storeLayout` is not invoked in electron when refreshing the browser window: https://github.com/eclipse-theia/theia/issues/6530
38
- // We store the state manually.
39
- // XXX: hack instead of injecting the `ArduinoShellLayoutRestorer` we have to retrieve it from the
40
- // application to avoid DI cycle.
36
+ // `storeLayout` has a sync API but the implementation is async, we store the layout manually before we reload the page.
37
+ // See: https://github.com/eclipse-theia/theia/issues/6579
38
+ // XXX: hack instead of injecting the `ArduinoShellLayoutRestorer` we have to retrieve it from the application to avoid DI cycle.
41
39
const layoutRestorer = ( this . app as any ) . layoutRestorer as ArduinoShellLayoutRestorer
42
40
await layoutRestorer . storeLayoutAsync ( this . app ) ;
43
41
window . location . reload ( true ) ;
You can’t perform that action at this time.
0 commit comments