Skip to content

Commit d5ad3cd

Browse files
authored
Merge pull request #40 from ccagml/dev
Dev
2 parents 5d7cc70 + c7a8215 commit d5ad3cd

File tree

5 files changed

+27
-22
lines changed

5 files changed

+27
-22
lines changed

CHANGELOG.md

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,6 @@
1+
## version 1.1.3
2+
- 修复每日一题隔天刷新问题
3+
14
## version 1.1.2
25
- 去除多余客户端代码
36

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 problem rating",
44
"description": "为LeetCode题目难度进行打分。避免只有简单、中等、困难三种难度",
5-
"version": "1.1.2",
5+
"version": "1.1.3",
66
"author": "ccagml",
77
"publisher": "ccagml",
88
"license": "MIT",

src/commands/session.ts

Lines changed: 19 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -33,25 +33,25 @@ export async function getSessionList(): Promise<ISession[]> {
3333
}
3434

3535
export async function manageSessions(): Promise<void> {
36-
const choice: IQuickItemEx<ISession | string> | undefined = await vscode.window.showQuickPick(parseSessionsToPicks(true /* includeOperation */));
37-
if (!choice || choice.description === "Active") {
38-
return;
39-
}
40-
if (choice.value === ":createSession") {
41-
await createSession();
42-
return;
43-
}
44-
if (choice.value === ":deleteSession") {
45-
await deleteSession();
46-
return;
47-
}
48-
try {
49-
await leetCodeExecutor.enableSession((choice.value as ISession).id);
50-
vscode.window.showInformationMessage(`Successfully switched to session '${choice.label}'.`);
51-
await vscode.commands.executeCommand("leetcode.refreshExplorer");
52-
} catch (error) {
53-
await promptForOpenOutputChannel("Failed to switch session. Please open the output channel for details.", DialogType.error);
54-
}
36+
// const choice: IQuickItemEx<ISession | string> | undefined = await vscode.window.showQuickPick(parseSessionsToPicks(true /* includeOperation */));
37+
// if (!choice || choice.description === "Active") {
38+
// return;
39+
// }
40+
// if (choice.value === ":createSession") {
41+
// await createSession();
42+
// return;
43+
// }
44+
// if (choice.value === ":deleteSession") {
45+
// await deleteSession();
46+
// return;
47+
// }
48+
// try {
49+
// await leetCodeExecutor.enableSession((choice.value as ISession).id);
50+
// vscode.window.showInformationMessage(`Successfully switched to session '${choice.label}'.`);
51+
// await vscode.commands.executeCommand("leetcode.refreshExplorer");
52+
// } catch (error) {
53+
// await promptForOpenOutputChannel("Failed to switch session. Please open the output channel for details.", DialogType.error);
54+
// }
5555
}
5656

5757
async function parseSessionsToPicks(includeOperations: boolean = false): Promise<Array<IQuickItemEx<ISession | string>>> {

src/explorer/explorerNodeManager.ts

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -71,6 +71,8 @@ class ExplorerNodeManager implements Disposable {
7171
if (element.type == SearchSetType.Day) {
7272
if (day_start <= element.time && element.time <= day_end) {
7373
need_get_today = false;
74+
} else {
75+
this.waitTodayQuestion = false
7476
}
7577
}
7678
});
@@ -143,7 +145,7 @@ class ExplorerNodeManager implements Disposable {
143145
];
144146
this.searchSet.forEach(element => {
145147
if (element.type == SearchSetType.Day) {
146-
const curDate = new Date()
148+
const curDate = new Date(element.time * 1000)
147149
baseNode.push(new LeetCodeNode(Object.assign({}, defaultProblem, {
148150
id: element.type,
149151
name: "[" + (curDate.getFullYear()) + "-" + (curDate.getMonth() + 1) + "-" + (curDate.getDate()) + "]" + SearchSetTypeName[SearchSetType.Day],

src/statusbar/LeetCodeStatusBarItem.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ export class LeetCodeStatusBarItem implements vscode.Disposable {
1616
switch (status) {
1717
case UserStatus.SignedIn:
1818
if (UserContestInfo && UserContestInfo.attendedContestsCount > 0) {
19-
this.statusBarItem.text = `用户: ${user}, 积分: ${UserContestInfo.rating}, 名次: ${UserContestInfo.localRanking} / ${UserContestInfo.localTotalParticipants} (${UserContestInfo.topPercentage}%), 全部名次: ${UserContestInfo.globalRanking} / ${UserContestInfo.globalTotalParticipants}`;
19+
this.statusBarItem.text = `用户: ${user}, 积分: ${Math.floor(UserContestInfo.rating)}, 名次: ${UserContestInfo.localRanking} / ${UserContestInfo.localTotalParticipants} (${UserContestInfo.topPercentage}%), 全部名次: ${UserContestInfo.globalRanking} / ${UserContestInfo.globalTotalParticipants}`;
2020
} else {
2121
this.statusBarItem.text = `user: ${user}`;
2222
}

0 commit comments

Comments
 (0)