mirror of
https://github.com/microsoft/vscode.git
synced 2026-05-08 17:19:48 +01:00
Refresh comments panel when it comes into view again, fixes https://github.com/Microsoft/vscode-pull-request-github/issues/334
This commit is contained in:
@@ -242,6 +242,18 @@ export class CommentsPanel extends Panel {
|
||||
return true;
|
||||
}
|
||||
|
||||
public setVisible(visible: boolean): TPromise<void> {
|
||||
const wasVisible = this.isVisible();
|
||||
return super.setVisible(visible)
|
||||
.then(() => {
|
||||
if (this.isVisible()) {
|
||||
if (!wasVisible) {
|
||||
this.refresh();
|
||||
}
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
private refresh(): void {
|
||||
if (this.isVisible()) {
|
||||
this.collapseAllAction.enabled = this.commentsModel.hasCommentThreads();
|
||||
|
||||
Reference in New Issue
Block a user