Skip to content
This repository was archived by the owner on Jun 21, 2023. It is now read-only.

Commit 1b6a9a1

Browse files
authored
Merge pull request #1781 from github/fixes/open-pr-in-browser
Prevent opening PR in browser multiple times.
2 parents aea6f73 + f543192 commit 1b6a9a1

File tree

1 file changed

+7
-0
lines changed

1 file changed

+7
-0
lines changed

src/GitHub.VisualStudio/Views/GitHubPane/PullRequestListView.xaml.cs

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -27,6 +27,7 @@ public partial class PullRequestListView : UserControl
2727
public PullRequestListView()
2828
{
2929
InitializeComponent();
30+
3031
DataContextChanged += (s, e) =>
3132
{
3233
var vm = DataContext as IPullRequestListViewModel;
@@ -42,6 +43,12 @@ public PullRequestListView()
4243
vm.OpenItemInBrowser.Subscribe(x => OpenInBrowser((IPullRequestListItemViewModel)x)));
4344
}
4445
};
46+
47+
Unloaded += (s, e) =>
48+
{
49+
subscription?.Dispose();
50+
subscription = null;
51+
};
4552
}
4653

4754
[Import]

0 commit comments

Comments
 (0)