Fixed #4289 setLoading to false too early before (#5503)

This commit is contained in:
Yurong He
2019-05-20 21:52:07 -07:00
committed by GitHub
parent 0bc9849ad8
commit fe7ec76cd5
2 changed files with 2 additions and 2 deletions

View File

@@ -115,7 +115,6 @@ export class TextCellComponent extends CellView implements OnInit, AfterContentI
} }
ngOnInit() { ngOnInit() {
this.setLoading(false);
this._register(this.themeService.onDidColorThemeChange(this.updateTheme, this)); this._register(this.themeService.onDidColorThemeChange(this.updateTheme, this));
this.updateTheme(this.themeService.getColorTheme()); this.updateTheme(this.themeService.getColorTheme());
this._cellToggleMoreActions.onInit(this.moreActionsElementRef, this.model, this.cellModel); 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._register(this.cellModel.onOutputsChanged(e => {
this.updatePreview(); this.updatePreview();
})); }));
this.setLoading(false);
} }
ngAfterContentInit(): void { ngAfterContentInit(): void {

View File

@@ -286,9 +286,9 @@ export class NotebookComponent extends AngularDisposable implements OnInit, OnDe
model.contentChanged((change) => this.handleContentChanged(change)); model.contentChanged((change) => this.handleContentChanged(change));
model.onProviderIdChange((provider) => this.handleProviderIdChanged(provider)); model.onProviderIdChange((provider) => this.handleProviderIdChanged(provider));
this._model = this._register(model); this._model = this._register(model);
this.setLoading(false);
this.updateToolbarComponents(this._model.trustedMode); this.updateToolbarComponents(this._model.trustedMode);
this._modelRegisteredDeferred.resolve(this._model); this._modelRegisteredDeferred.resolve(this._model);
this.setLoading(false);
await model.startSession(this.model.notebookManager, undefined, true); await model.startSession(this.model.notebookManager, undefined, true);
this.setContextKeyServiceWithProviderId(model.providerId); this.setContextKeyServiceWithProviderId(model.providerId);
this.fillInActionsForCurrentContext(); this.fillInActionsForCurrentContext();