Skip to content

Commit e545871

Browse files
authored
Only fire collapsible change event if actually changed. (microsoft#213910)
1 parent 7ea8fbb commit e545871

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

src/vs/workbench/api/browser/mainThreadComments.ts

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -109,8 +109,10 @@ export class MainThreadCommentThread<T> implements languages.CommentThread<T> {
109109
}
110110

111111
set collapsibleState(newState: languages.CommentThreadCollapsibleState | undefined) {
112-
this._collapsibleState = newState;
113-
this._onDidChangeCollapsibleState.fire(this._collapsibleState);
112+
if (newState !== this._collapsibleState) {
113+
this._collapsibleState = newState;
114+
this._onDidChangeCollapsibleState.fire(this._collapsibleState);
115+
}
114116
}
115117

116118
private _initialCollapsibleState: languages.CommentThreadCollapsibleState | undefined;

0 commit comments

Comments
 (0)