Movatterモバイル変換


[0]ホーム

URL:


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

Commit8024c3d

Browse files
committed
fix the bug that explorer has duplicate nodes
1 parent7d619b3 commit8024c3d

File tree

1 file changed

+1
-3
lines changed

1 file changed

+1
-3
lines changed

‎src/leetCodeExplorer.ts

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,6 @@ export class LeetCodeTreeDataProvider implements vscode.TreeDataProvider<LeetCod
4141
constructor(privatecontext:vscode.ExtensionContext,privatechannel:vscode.OutputChannel){}
4242

4343
publicasyncrefresh():Promise<void>{
44-
this.treeData.clear();
4544
awaitthis.getProblemData();
4645
this.onDidChangeTreeDataEvent.fire();
4746
}
@@ -100,14 +99,14 @@ export class LeetCodeTreeDataProvider implements vscode.TreeDataProvider<LeetCod
10099

101100
privateasyncgetProblemData():Promise<void>{
102101
constallProblems:list.IProblem[]=awaitlist.listProblems(this.channel);
102+
this.treeData.clear();
103103
for(constproblemofallProblems){
104104
constproblems:list.IProblem[]|undefined=this.treeData.get(problem.difficulty);
105105
if(problems){
106106
problems.push(problem);
107107
}else{
108108
this.treeData.set(problem.difficulty,[problem]);
109109
}
110-
111110
}
112111
}
113112

@@ -156,5 +155,4 @@ export class LeetCodeTreeDataProvider implements vscode.TreeDataProvider<LeetCod
156155
});
157156
returndifficultynodes;
158157
}
159-
160158
}

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp