Skip to content

Commit

Permalink
ReviewZoneWidget makes duplicate calls to show() + hide()
Browse files Browse the repository at this point in the history
Fixes #174263
  • Loading branch information
alexr00 committed Mar 9, 2023
1 parent 2e34c9a commit 10209b9
Showing 1 changed file with 4 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -285,10 +285,6 @@ export class ReviewZoneWidget extends ZoneWidget implements ICommentThreadWidget
toggleExpand() {
if (this._isExpanded) {
this._commentThread.collapsibleState = languages.CommentThreadCollapsibleState.Collapsed;
this.hide();
if (!this._commentThread.comments || !this._commentThread.comments.length) {
this.deleteCommentThread();
}
} else {
this._commentThread.collapsibleState = languages.CommentThreadCollapsibleState.Expanded;
}
Expand Down Expand Up @@ -468,6 +464,10 @@ export class ReviewZoneWidget extends ZoneWidget implements ICommentThreadWidget
if (this.editor.hasWidgetFocus()) {
this.editor.focus();
}

if (!this._commentThread.comments || !this._commentThread.comments.length) {
this.deleteCommentThread();
}
}
super.hide();
}
Expand Down

0 comments on commit 10209b9

Please sign in to comment.