Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit d764006

Browse files
committed
change progress location from window to notification
1 parent 2e6e9ee commit d764006

File tree

4 files changed

+7
-7
lines changed

4 files changed

+7
-7
lines changed

‎package-lock.json

Lines changed: 3 additions & 3 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

‎package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77
"publisher": "shengchen",
88
"icon": "resources/LeetCode.png",
99
"engines": {
10-
"vscode": "^1.20.0"
10+
"vscode": "^1.23.0"
1111
},
1212
"repository": {
1313
"type": "git",

‎src/commands/show.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ import * as vscode from "vscode";
55
import { LeetCodeNode } from "../leetCodeExplorer";
66
import { leetCodeManager } from "../leetCodeManager";
77
import { IQuickItemEx, languages, leetCodeBinaryPath, ProblemState } from "../shared";
8-
import { executeCommand } from "../utils/cpUtils";
8+
import { executeCommandWithProgress } from "../utils/cpUtils";
99
import { DialogOptions, DialogType, promptForOpenOutputChannel, promptForSignIn } from "../utils/uiUtils";
1010
import { selectWorkspaceFolder } from "../utils/workspaceUtils";
1111
import * as wsl from "../utils/wslUtils";
@@ -50,7 +50,7 @@ async function showProblemInternal(id: string): Promise<void> {
5050

5151
const outdir: string = await selectWorkspaceFolder();
5252
await fse.ensureDir(outdir);
53-
const result: string = await executeCommand("node", [leetCodeBinaryPath, "show", id, "-gx", "-l", language, "-o", `"${outdir}"`]);
53+
const result: string = await executeCommandWithProgress("Fetching problem data...","node", [leetCodeBinaryPath, "show", id, "-gx", "-l", language, "-o", `"${outdir}"`]);
5454
const reg: RegExp = /\*SourceCode:\s*(.*)/;
5555
const match: RegExpMatchArray | null = result.match(reg);
5656
if (match && match.length >= 2) {

‎src/utils/cpUtils.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,7 @@ export async function executeCommand(command: string, args: string[], options: c
3434

3535
export async function executeCommandWithProgress(message: string, command: string, args: string[], options: cp.SpawnOptions = { shell: true }): Promise<string> {
3636
let result: string = "";
37-
await vscode.window.withProgress({ location: vscode.ProgressLocation.Window }, async (p: vscode.Progress<{}>) => {
37+
await vscode.window.withProgress({ location: vscode.ProgressLocation.Notification }, async (p: vscode.Progress<{}>) => {
3838
return new Promise(async (resolve: () => void, reject: (e: Error) => void): Promise<void> => {
3939
p.report({ message });
4040
try {

0 commit comments

Comments
(0)

AltStyle によって変換されたページ (->オリジナル) /