- Notifications
You must be signed in to change notification settings - Fork692
Support locked problems#19
Conversation
jdneo commentedMar 9, 2018
Hi@TsFreddie Thank you for the contribution! Looks nice! Just interested about the intension of supporting locked problem. Could you please explain more about this feature to me? |
TsFreddie commentedMar 9, 2018
jdneo commentedMar 9, 2018
@TsFreddie Oh, got your idea. That means: although the icon is a lock, but the paid user still can open the problem and try to solve it. Am I right? I don't have a premium account so I was not aware of that. 😄 |
TsFreddie commentedMar 9, 2018
Exactly. leetcode-cli isn't very descriptive about what it means by "locked". |
jdneo commentedMar 9, 2018
Good to know that. Thanks for pointing out. 👍 I still have some stuff need to do. Will review the PR in detail ASAP! |
src/commands/list.ts Outdated
| import { DialogType, promptForOpenOutputChannel } from "../utils/uiUtils"; | ||
| export interface IProblem { | ||
| favorate: boolean; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others.Learn more.
typo: favorite
src/commands/list.ts Outdated
| } | ||
| const result: string = await executeCommand(channel, "node", [leetCodeBinaryPath, "list", "-q", "L"]); | ||
| const leetCodeConfig: vscode.WorkspaceConfiguration = vscode.workspace.getConfiguration("leetcode"); | ||
| const showLocked = leetCodeConfig.get<string>("showLocked"); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others.Learn more.
nit: add a type definition: const showLocked:boolean = ...
package.json Outdated
| "properties": { | ||
| "leetcode.showLocked": { | ||
| "type": "boolean", | ||
| "default": true, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others.Learn more.
Suggest we set the default value to false, since I think there are more common users than the premium ones.
jdneo commentedMar 9, 2018
@TsFreddie Just some small changes, thanks. |
jdneo commentedMar 10, 2018
Great! Thanks. |


Uh oh!
There was an error while loading.Please reload this page.
Issue:#20
Added support for locked problems.
The regex is changed to match favorite, locked and state:
The lock icon is grabbed from EmojiOne v2.0, please change it or add a license.
Please review the regex before merge.