Skip to content

Commit

Permalink
Avoid repeatedly setting busy and ready for language server status (#…
Browse files Browse the repository at this point in the history
…2494)

Signed-off-by: Shi Chen <[email protected]>
  • Loading branch information
CsCherrYY authored Jun 10, 2022
1 parent 1830d4d commit 4d954f7
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions src/languageStatusItemFactory.ts
Original file line number Diff line number Diff line change
Expand Up @@ -63,6 +63,9 @@ export namespace ServerStatusItemFactory {
}

export function setBusy(item: any): void {
if (item.busy === true) {
return;
}
item.text = "Building";
item.busy = true;
}
Expand Down Expand Up @@ -91,6 +94,9 @@ export namespace ServerStatusItemFactory {
}

export function setReady(item: any): void {
if (item.text === StatusIcon.Ready) {
return;
}
item.busy = false;
item.severity = vscode.LanguageStatusSeverity?.Information;
item.command = StatusCommands.showServerStatusCommand;
Expand Down

0 comments on commit 4d954f7

Please sign in to comment.