@@ -59,18 +59,16 @@ async Task InitializeMenus()
5959 var componentModel = ( IComponentModel ) ( await GetServiceAsync ( typeof ( SComponentModel ) ) ) ;
6060 var exports = componentModel . DefaultExportProvider ;
6161
62- // await ThreadingHelper.SwitchToMainThreadAsync() won't return until after a solution
63- // has been loaded. We're using the following instead as a workaround.
64- await ThreadingHelper . MainThreadDispatcher . InvokeAsync ( ( ) =>
65- menuService . AddCommands (
66- exports . GetExportedValue < IAddConnectionCommand > ( ) ,
67- exports . GetExportedValue < IBlameLinkCommand > ( ) ,
68- exports . GetExportedValue < ICopyLinkCommand > ( ) ,
69- exports . GetExportedValue < ICreateGistCommand > ( ) ,
70- exports . GetExportedValue < IOpenLinkCommand > ( ) ,
71- exports . GetExportedValue < IOpenPullRequestsCommand > ( ) ,
72- exports . GetExportedValue < IShowCurrentPullRequestCommand > ( ) ,
73- exports . GetExportedValue < IShowGitHubPaneCommand > ( ) ) ) ;
62+ await ThreadingHelper . SwitchToMainThreadAsync ( ) ;
63+ menuService . AddCommands (
64+ exports . GetExportedValue < IAddConnectionCommand > ( ) ,
65+ exports . GetExportedValue < IBlameLinkCommand > ( ) ,
66+ exports . GetExportedValue < ICopyLinkCommand > ( ) ,
67+ exports . GetExportedValue < ICreateGistCommand > ( ) ,
68+ exports . GetExportedValue < IOpenLinkCommand > ( ) ,
69+ exports . GetExportedValue < IOpenPullRequestsCommand > ( ) ,
70+ exports . GetExportedValue < IShowCurrentPullRequestCommand > ( ) ,
71+ exports . GetExportedValue < IShowGitHubPaneCommand > ( ) ) ;
7472 }
7573
7674 async Task EnsurePackageLoaded ( Guid packageGuid )
0 commit comments