File tree Expand file tree Collapse file tree 1 file changed +4
-8
lines changed Expand file tree Collapse file tree 1 file changed +4
-8
lines changed Original file line number Diff line number Diff line change @@ -79,26 +79,22 @@ async function showProblemInternal(channel: vscode.OutputChannel, id: string): P
7979async function parseProblemsToPicks ( p : Promise < list . IProblem [ ] > ) : Promise < Array < IQuickItemEx < string > > > {
8080 return new Promise ( async ( resolve : ( res : Array < IQuickItemEx < string > > ) => void ) : Promise < void > => {
8181 const picks : Array < IQuickItemEx < string > > = ( await p ) . map ( ( problem : list . IProblem ) => Object . assign ( { } , {
82- label : `${ parseProblemDecorator ( problem . state ) } ${ problem . id } .${ problem . name } ` ,
82+ label : `${ parseProblemDecorator ( problem . state , problem . locked ) } ${ problem . id } .${ problem . name } ` ,
8383 description : "" ,
84- detail : `${ parseLockDecorator ( problem . locked ) } AC rate: ${ problem . passRate } , Difficulty: ${ problem . difficulty } ` ,
84+ detail : `AC rate: ${ problem . passRate } , Difficulty: ${ problem . difficulty } ` ,
8585 value : problem . id ,
8686 } ) ) ;
8787 resolve ( picks ) ;
8888 } ) ;
8989}
9090
91- function parseProblemDecorator ( state : ProblemState ) : string {
91+ function parseProblemDecorator ( state : ProblemState , locked : boolean ) : string {
9292 switch ( state ) {
9393 case ProblemState . AC :
9494 return "$(check) " ;
9595 case ProblemState . NotAC :
9696 return "$(x) " ;
9797 default :
98- return "" ;
98+ return locked ? "$(lock) " : "" ;
9999 }
100100}
101-
102- function parseLockDecorator ( locked : boolean ) : string {
103- return locked ? "$(lock) " : "" ;
104- }
You can’t perform that action at this time.
0 commit comments