File tree Expand file tree Collapse file tree 1 file changed +3
-2
lines changed
Expand file tree Collapse file tree 1 file changed +3
-2
lines changed Original file line number Diff line number Diff line change @@ -133,8 +133,9 @@ export const COMMENT_EXPAND_STATE_SETTING = 'commentExpandState';
133133export const COMMENT_EXPAND_STATE_COLLAPSE_VALUE = 'collapseAll' ;
134134export const COMMENT_EXPAND_STATE_EXPAND_VALUE = 'expandUnresolved' ;
135135export function getCommentCollapsibleState ( thread : IReviewThread , expand ?: boolean , currentUser ?: string ) {
136- if ( thread . isResolved
137- || ( ! thread . isOutdated && currentUser && ( thread . comments [ thread . comments . length - 1 ] . user ?. login === currentUser ) ) ) {
136+ const isFromCurrent = ( currentUser && ( thread . comments [ thread . comments . length - 1 ] . user ?. login === currentUser ) ) ;
137+ const isJustSuggestion = thread . comments . length === 1 && thread . comments [ 0 ] . body . startsWith ( '```suggestion' ) && thread . comments [ 0 ] . body . endsWith ( '```' ) ;
138+ if ( thread . isResolved || ( ! thread . isOutdated && isFromCurrent && ! isJustSuggestion ) ) {
138139 return vscode . CommentThreadCollapsibleState . Collapsed ;
139140 }
140141 if ( expand === undefined ) {
You can’t perform that action at this time.
0 commit comments