-
Notifications
You must be signed in to change notification settings - Fork 1.2k
Ensure that the GitHubPaneViewModel is initalized. #1426
Conversation
- Renamed `IGitHubToolWindowManager.ShowHomePane` to `ShowGitHubPane` because the latter is what we call it these days - Make `IGitHubToolWindowManager.ShowGitHubPane` async to make sure that `GitHubPaneViewModel.InitializeAsync` has finished before passing back a refrence to the `GitHubPaneViewModel` - Make the methods that call `IGitHubToolWindowManager.ShowGitHubPane` `void async` with logging when they fail
|
When the GitHub pane is shown from VS rather than our own code, kick off an initialization of the view model. This means we can't be sure of the state of the view model's initialization so make subsequent calls to the view model async either wait for an ongoing initialization, or exit if already initialized.
|
@jcansdale could you take another look at this? It's hopefully working now. |
| /// Ensures that the service is initialized. | ||
| /// </summary> | ||
| /// <returns>A task that when completed indicates that the service is initialized.</returns> | ||
| /// <remarks> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Simplying? ;-)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hmm, is seems I missed the line with simplying and it isn't showing up for me as an in-line comment. What's going on? 😕
jcansdale
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I did a test merge with #1396 and this is working great! Apart from the typo I didn't notice any other issues. LGTM. 😄
jcansdale
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM

IGitHubToolWindowManager.ShowHomePanetoShowGitHubPanebecause the latter is what we call it these daysIGitHubToolWindowManager.ShowGitHubPaneasync to make sure thatGitHubPaneViewModel.InitializeAsynchas finished before passing back a refrence to theGitHubPaneViewModelIGitHubToolWindowManager.ShowGitHubPanevoid asyncwith logging when they fail