Don't show JS/TS loading indicator eagerly (#180265)

This fixes the loading indicator showing when an extension opens an in-memory JS file that doesn't belong to any project
This commit is contained in:
Matt Bierner
2023-04-18 19:14:49 -07:00
committed by GitHub
parent f24d50369f
commit 6fefe056e2

View File

@@ -111,7 +111,7 @@ export default class TypeScriptServiceClient extends Disposable implements IType
private _isPromptingAfterCrash = false;
private isRestarting: boolean = false;
private hasServerFatallyCrashedTooManyTimes = false;
private readonly loadingIndicator = new ServerInitializingIndicator();
private readonly loadingIndicator = this._register(new ServerInitializingIndicator());
public readonly telemetryReporter: TelemetryReporter;
public readonly bufferSyncSupport: BufferSyncSupport;
@@ -470,10 +470,6 @@ export default class TypeScriptServiceClient extends Disposable implements IType
handle.onEvent(event => this.dispatchEvent(event));
if (apiVersion.gte(API.v300) && this.capabilities.has(ClientCapability.Semantic)) {
this.loadingIndicator.startedLoadingProject(undefined /* projectName */);
}
this.serviceStarted(resendModels);
this._onReady!.resolve();