From 9313140c596699abf095a30e6ac33a7e26c2e1a0 Mon Sep 17 00:00:00 2001 From: Chris LaFreniere <40371649+chlafreniere@users.noreply.github.com> Date: Mon, 18 Mar 2019 10:18:03 -0700 Subject: [PATCH] Fix install packages not always showing on startup (#4566) --- src/sql/parts/notebook/notebook.component.ts | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/src/sql/parts/notebook/notebook.component.ts b/src/sql/parts/notebook/notebook.component.ts index 801a1876ff..c25c38b024 100644 --- a/src/sql/parts/notebook/notebook.component.ts +++ b/src/sql/parts/notebook/notebook.component.ts @@ -223,10 +223,6 @@ export class NotebookComponent extends AngularDisposable implements OnInit, OnDe private async loadModel(): Promise { await this.awaitNonDefaultProvider(); - let providerId = 'sql'; // this is tricky; really should also depend on the connection profile - this.setContextKeyServiceWithProviderId(providerId); - this.fillInActionsForCurrentContext(); - let model = new NotebookModel({ factory: this.modelFactory, notebookUri: this._notebookParams.notebookUri, @@ -249,6 +245,8 @@ export class NotebookComponent extends AngularDisposable implements OnInit, OnDe this.updateToolbarComponents(this._model.trustedMode); this._modelRegisteredDeferred.resolve(this._model); await model.startSession(this.model.notebookManager, undefined, true); + this.setContextKeyServiceWithProviderId(model.providerId); + this.fillInActionsForCurrentContext(); this.detectChanges(); }