@@ -97,6 +97,11 @@ abstract class CommentBase implements vscode.Comment {
9797 */
9898 public label : string | undefined ;
9999
100+ /**
101+ * The state of the comment
102+ */
103+ public state ?: vscode . CommentState ;
104+
100105 /**
101106 * The list of reactions to the comment
102107 */
@@ -172,7 +177,7 @@ export class TemporaryComment extends CommentBase {
172177 name : currentUser . specialDisplayName ?? currentUser . login ,
173178 iconPath : currentUser . avatarUrl ? vscode . Uri . parse ( `${ currentUser . avatarUrl } &s=64` ) : undefined ,
174179 } ;
175- this . label = isDraft ? vscode . l10n . t ( 'Pending' ) : undefined ;
180+ this . state = isDraft ? vscode . CommentState . Draft : vscode . CommentState . Published ;
176181 this . contextValue = 'temporary,canEdit,canDelete' ;
177182 this . originalBody = originalComment ? originalComment . rawComment . body : undefined ;
178183 this . reactions = originalComment ? originalComment . reactions : undefined ;
@@ -248,7 +253,7 @@ export class GHPRComment extends CommentBase {
248253
249254 updateCommentReactions ( this , comment . reactions ) ;
250255
251- this . label = comment . isDraft ? vscode . l10n . t ( 'Pending' ) : undefined ;
256+ this . state = comment . isDraft ? vscode . CommentState . Draft : vscode . CommentState . Published ;
252257
253258 const contextValues : string [ ] = [ ] ;
254259 if ( comment . canEdit ) {
@@ -286,9 +291,9 @@ export class GHPRComment extends CommentBase {
286291 refresh = true ;
287292 }
288293
289- const oldLabel = this . label ;
290- this . label = comment . isDraft ? vscode . l10n . t ( 'Pending' ) : undefined ;
291- if ( this . label !== oldLabel ) {
294+ const oldState = this . state ;
295+ this . state = comment . isDraft ? vscode . CommentState . Draft : vscode . CommentState . Published ;
296+ if ( this . state !== oldState ) {
292297 refresh = true ;
293298 }
294299
0 commit comments