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

Commit e4e574d

Browse files
jcansdaleStanleyGoldman
authored andcommitted
Clean up when view is unloaded
1 parent 88109fb commit e4e574d

File tree

1 file changed

+2
-9
lines changed

1 file changed

+2
-9
lines changed

src/GitHub.VisualStudio.16/Sync/PublishSection.cs

Lines changed: 2 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,7 @@
2020
using Task = System.Threading.Tasks.Task;
2121
using Microsoft.VisualStudio.Shell;
2222
using System.ComponentModel.Composition.Hosting;
23+
using System.Windows;
2324

2425
namespace Microsoft.TeamExplorerSample.Sync
2526
{
@@ -107,14 +108,6 @@ void ShowPublishDialog()
107108
var view = factory.CreateView<IRepositoryPublishViewModel>();
108109
view.DataContext = viewModel;
109110

110-
SectionContent = view;
111-
112-
/*
113-
114-
var view = factory.CreateView<IRepositoryPublishViewModel>();
115-
view.DataContext = viewModel;
116-
SectionContent = view;
117-
118111
Observable.FromEventPattern<RoutedEventHandler, RoutedEventArgs>(
119112
x => view.Unloaded += x,
120113
x => view.Unloaded -= x)
@@ -125,7 +118,7 @@ void ShowPublishDialog()
125118
completed.Dispose();
126119
});
127120

128-
*/
121+
SectionContent = view;
129122
}
130123

131124
ExportProvider GetExportProvider()

0 commit comments

Comments
 (0)