From 6fefe056e2474b856699c5b0e829ea1c19e75cd0 Mon Sep 17 00:00:00 2001 From: Matt Bierner Date: Tue, 18 Apr 2023 19:14:49 -0700 Subject: [PATCH] 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 --- .../src/typescriptServiceClient.ts | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) diff --git a/extensions/typescript-language-features/src/typescriptServiceClient.ts b/extensions/typescript-language-features/src/typescriptServiceClient.ts index a96a335af67..31e86e6100f 100644 --- a/extensions/typescript-language-features/src/typescriptServiceClient.ts +++ b/extensions/typescript-language-features/src/typescriptServiceClient.ts @@ -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();