Fix comment not expanding (#213985)

Fixes #213974
This commit is contained in:
Alex Ross 2024-05-31 06:00:25 -07:00 committed by GitHub
parent 606c7e23cf
commit 07eca286b3
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -150,7 +150,6 @@ export class ReviewZoneWidget extends ZoneWidget implements ICommentThreadWidget
this._initialCollapsibleState = _pendingComment ? languages.CommentThreadCollapsibleState.Expanded : _commentThread.initialCollapsibleState;
_commentThread.initialCollapsibleState = this._initialCollapsibleState;
this._isExpanded = this._initialCollapsibleState === languages.CommentThreadCollapsibleState.Expanded;
this._commentThreadDisposables = [];
this.create();
@ -439,7 +438,7 @@ export class ReviewZoneWidget extends ZoneWidget implements ICommentThreadWidget
}
_refresh(dimensions: dom.Dimension) {
if (dimensions.height === 0 && dimensions.width === 0) {
if ((this._isExpanded === undefined) && (dimensions.height === 0) && (dimensions.width === 0)) {
this.commentThread.collapsibleState = languages.CommentThreadCollapsibleState.Collapsed;
return;
}