diff --git a/CHANGELOG.md b/CHANGELOG.md index fdb5e99..0e2edde 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,3 +1,7 @@ +## version 2.11.16 + +- 修正提交结果页面耗时显示 + ## version 2.11.15 - 修复 测试用例块 过滤注释符号的方式 diff --git a/package.json b/package.json index 06174bc..7c33937 100644 --- a/package.json +++ b/package.json @@ -2,7 +2,7 @@ "name": "vscode-leetcode-problem-rating", "displayName": "LeetCode", "description": "LeetCode 官方插件增强, 代码开源, 增加 LeetCode 题目难度分, 给个star吧, 球球了", - "version": "2.11.15", + "version": "2.11.16", "author": "ccagml", "publisher": "ccagml", "license": "MIT", diff --git a/src/service/SubmissionService.ts b/src/service/SubmissionService.ts index 51d4826..11a65be 100644 --- a/src/service/SubmissionService.ts +++ b/src/service/SubmissionService.ts @@ -23,8 +23,9 @@ class SubmissionService extends BaseWebViewService { this.result = this.parseResult(resultString); const temp = this.getSubmitEvent(); - if (temp?.accepted && temp?.sub_type == "submit") { - this.result["costTime"] = [`耗时${statusBarTimeService.getCostTimeStr()}`]; + let costTime = statusBarTimeService.getCostTimeStr(); + if (temp?.accepted && temp?.sub_type == "submit" && costTime) { + this.result["costTime"] = [`耗时 ${costTime}`]; } this.showWebviewInternal(); this.showKeybindingsHint();