Fix install packages not always showing on startup (#4566)

This commit is contained in:
Chris LaFreniere
2019-03-18 10:18:03 -07:00
committed by GitHub
parent 25b1d4b673
commit 9313140c59

View File

@@ -223,10 +223,6 @@ export class NotebookComponent extends AngularDisposable implements OnInit, OnDe
private async loadModel(): Promise<void> {
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();
}