Skip to content

Commit a6fa562

Browse files
authored
Merge pull request #156 from ccagml/main
修正提交结果页面耗时显示
2 parents fe7198d + b5fe9cd commit a6fa562

File tree

3 files changed

+8
-3
lines changed

3 files changed

+8
-3
lines changed

CHANGELOG.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,7 @@
1+
## version 2.11.16
2+
3+
- 修正提交结果页面耗时显示
4+
15
## version 2.11.15
26

37
- 修复 测试用例块 过滤注释符号的方式

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
"name": "vscode-leetcode-problem-rating",
33
"displayName": "LeetCode",
44
"description": "LeetCode 官方插件增强, 代码开源, 增加 LeetCode 题目难度分, 给个star吧, 球球了",
5-
"version": "2.11.15",
5+
"version": "2.11.16",
66
"author": "ccagml",
77
"publisher": "ccagml",
88
"license": "MIT",

src/service/SubmissionService.ts

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -23,8 +23,9 @@ class SubmissionService extends BaseWebViewService {
2323
this.result = this.parseResult(resultString);
2424

2525
const temp = this.getSubmitEvent();
26-
if (temp?.accepted && temp?.sub_type == "submit") {
27-
this.result["costTime"] = [`耗时${statusBarTimeService.getCostTimeStr()}`];
26+
let costTime = statusBarTimeService.getCostTimeStr();
27+
if (temp?.accepted && temp?.sub_type == "submit" && costTime) {
28+
this.result["costTime"] = [`耗时 ${costTime}`];
2829
}
2930
this.showWebviewInternal();
3031
this.showKeybindingsHint();

0 commit comments

Comments
 (0)