Skip to content

Commit 607b6eb

Browse files
author
RMacfarlane
committed
Update checkout button on active pull request change, fixes #1538
1 parent d52df10 commit 607b6eb

1 file changed

Lines changed: 10 additions & 0 deletions

File tree

src/github/pullRequestOverview.ts

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -65,6 +65,16 @@ export class PullRequestOverviewPanel extends IssueOverviewPanel {
6565
protected constructor(extensionPath: string, column: vscode.ViewColumn, title: string, pullRequestManager: PullRequestManager, descriptionNode: DescriptionNode) {
6666
super(extensionPath, column, title, pullRequestManager, descriptionNode, PullRequestOverviewPanel._viewType);
6767

68+
this._pullRequestManager.onDidChangeActivePullRequest(_ => {
69+
if (this._pullRequestManager && this._item) {
70+
const isCurrentlyCheckedOut = this._item.equals(this._pullRequestManager.activePullRequest);
71+
this._postMessage({
72+
command: 'pr.update-checkout-status',
73+
isCurrentlyCheckedOut: isCurrentlyCheckedOut
74+
});
75+
}
76+
}, null, this._disposables);
77+
6878
onDidUpdatePR(pr => {
6979
if (pr) {
7080
this._item.update(pr);

0 commit comments

Comments
 (0)