@@ -79,26 +79,22 @@ async function showProblemInternal(channel: vscode.OutputChannel, id: string): P
79
79
async function parseProblemsToPicks ( p :Promise < list . IProblem [ ] > ) :Promise < Array < IQuickItemEx < string > > > {
80
80
return new Promise ( async ( resolve :( res :Array < IQuickItemEx < string > > ) => void ) :Promise < void > => {
81
81
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 } ` ,
83
83
description :"" ,
84
- detail :`${ parseLockDecorator ( problem . locked ) } AC rate:${ problem . passRate } , Difficulty:${ problem . difficulty } ` ,
84
+ detail :`AC rate:${ problem . passRate } , Difficulty:${ problem . difficulty } ` ,
85
85
value :problem . id ,
86
86
} ) ) ;
87
87
resolve ( picks ) ;
88
88
} ) ;
89
89
}
90
90
91
- function parseProblemDecorator ( state :ProblemState ) :string {
91
+ function parseProblemDecorator ( state :ProblemState , locked : boolean ) :string {
92
92
switch ( state ) {
93
93
case ProblemState . AC :
94
94
return "$(check) " ;
95
95
case ProblemState . NotAC :
96
96
return "$(x) " ;
97
97
default :
98
- return "" ;
98
+ return locked ? "$(lock) " : "" ;
99
99
}
100
100
}
101
-
102
- function parseLockDecorator ( locked :boolean ) :string {
103
- return locked ?"$(lock) " :"" ;
104
- }