diff --git a/src/sql/workbench/parts/notebook/cellViews/textCell.component.ts b/src/sql/workbench/parts/notebook/cellViews/textCell.component.ts index 77e9fed623..6871663bc4 100644 --- a/src/sql/workbench/parts/notebook/cellViews/textCell.component.ts +++ b/src/sql/workbench/parts/notebook/cellViews/textCell.component.ts @@ -115,7 +115,6 @@ export class TextCellComponent extends CellView implements OnInit, AfterContentI } ngOnInit() { - this.setLoading(false); this._register(this.themeService.onDidColorThemeChange(this.updateTheme, this)); this.updateTheme(this.themeService.getColorTheme()); this._cellToggleMoreActions.onInit(this.moreActionsElementRef, this.model, this.cellModel); @@ -123,6 +122,7 @@ export class TextCellComponent extends CellView implements OnInit, AfterContentI this._register(this.cellModel.onOutputsChanged(e => { this.updatePreview(); })); + this.setLoading(false); } ngAfterContentInit(): void { diff --git a/src/sql/workbench/parts/notebook/notebook.component.ts b/src/sql/workbench/parts/notebook/notebook.component.ts index cdd4aca499..4557f1baee 100644 --- a/src/sql/workbench/parts/notebook/notebook.component.ts +++ b/src/sql/workbench/parts/notebook/notebook.component.ts @@ -286,9 +286,9 @@ export class NotebookComponent extends AngularDisposable implements OnInit, OnDe model.contentChanged((change) => this.handleContentChanged(change)); model.onProviderIdChange((provider) => this.handleProviderIdChanged(provider)); this._model = this._register(model); - this.setLoading(false); this.updateToolbarComponents(this._model.trustedMode); this._modelRegisteredDeferred.resolve(this._model); + this.setLoading(false); await model.startSession(this.model.notebookManager, undefined, true); this.setContextKeyServiceWithProviderId(model.providerId); this.fillInActionsForCurrentContext();