Skip to content

Commit b4848f6

Browse files
author
Akos Kitta
committed
Corrected the docs.
Signed-off-by: Akos Kitta <kittaakos@typefox.io>
1 parent f359843 commit b4848f6

File tree

1 file changed

+3
-5
lines changed

1 file changed

+3
-5
lines changed

arduino-ide-extension/src/browser/editor-mode.ts

+3-5
Original file line numberDiff line numberDiff line change
@@ -33,11 +33,9 @@ export class EditorMode implements FrontendApplicationContribution {
3333
shell.closeTabs(area, ({ owner }) => !(owner instanceof EditorWidget || owner instanceof OutputWidget));
3434
}
3535
}
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.
4139
const layoutRestorer = (this.app as any).layoutRestorer as ArduinoShellLayoutRestorer
4240
await layoutRestorer.storeLayoutAsync(this.app);
4341
window.location.reload(true);

0 commit comments

Comments
 (0)