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

Commit e3158d2

Browse files
committed
Make GitHubPane await initialization of IGitHubPaneViewModel
GitHubPackage shouldn't be concerned about this.
1 parent 89ffd87 commit e3158d2

File tree

2 files changed

+2
-4
lines changed

2 files changed

+2
-4
lines changed

src/GitHub.VisualStudio/GitHubPackage.cs

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -149,9 +149,7 @@ public async Task<IGitHubPaneViewModel> ShowGitHubPane()
149149
}
150150

151151
var gitHubPane = (GitHubPane)pane;
152-
var viewModel = await gitHubPane.GetViewModelAsync();
153-
await viewModel.InitializeAsync(pane);
154-
return viewModel;
152+
return await gitHubPane.GetViewModelAsync();
155153
}
156154

157155
static ToolWindowPane ShowToolWindow(Guid windowGuid)

src/GitHub.VisualStudio/UI/GitHubPane.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -101,7 +101,7 @@ async Task InitializeAsync()
101101

102102
var factory = provider.GetService<IViewViewModelFactory>();
103103
var viewModel = provider.ExportProvider.GetExportedValue<IGitHubPaneViewModel>();
104-
viewModel.InitializeAsync(this).Catch(ShowError).Forget();
104+
await viewModel.InitializeAsync(this);
105105

106106
View = factory.CreateView<IGitHubPaneViewModel>();
107107
View.DataContext = viewModel;

0 commit comments

Comments
 (0)