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

Commit fc2d2c1

Browse files
committed
Navigate to Home after clone starts on 2017
- Be consistent between 2015 and 2017 by navigating to Home page after clone starts. - There's no need to use JoinableTaskFactory.RunAsync when a task is being awaited.
1 parent 38a754a commit fc2d2c1

File tree

1 file changed

+5
-11
lines changed

1 file changed

+5
-11
lines changed

src/GitHub.TeamFoundation.14/Services/VSGitServices.cs

Lines changed: 5 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -88,21 +88,15 @@ public async Task Clone(
8888
#if TEAMEXPLORER14
8989
await StartClonenOnConnectPageAsync(teamExplorer, cloneUrl, clonePath, recurseSubmodules);
9090
await WaitForCloneOnHomePageAsync(teamExplorer);
91-
92-
// Show the repository on Team Explorer - Home
93-
vsServices.Value.TryOpenRepository(clonePath);
91+
vsServices.Value.TryOpenRepository(clonePath); // Show the repository on Team Explorer - Home
9492
#else
9593
var gitExt = serviceProvider.GetService<IGitActionsExt>();
9694
var typedProgress = ((Progress<ServiceProgressData>)progress) ?? new Progress<ServiceProgressData>();
95+
typedProgress.ProgressChanged += (s, e) => statusBar.Value.ShowMessage(e.ProgressText);
96+
var cloneTask = gitExt.CloneAsync(cloneUrl, clonePath, recurseSubmodules, default(CancellationToken), typedProgress);
9797

98-
// Show progress on Team Explorer - Home
99-
NavigateToHomePage(teamExplorer);
100-
101-
await Microsoft.VisualStudio.Shell.ThreadHelper.JoinableTaskFactory.RunAsync(async () =>
102-
{
103-
typedProgress.ProgressChanged += (s, e) => statusBar.Value.ShowMessage(e.ProgressText);
104-
await gitExt.CloneAsync(cloneUrl, clonePath, recurseSubmodules, default(CancellationToken), typedProgress);
105-
});
98+
NavigateToHomePage(teamExplorer); // Show progress on Team Explorer - Home
99+
await cloneTask;
106100
#endif
107101
}
108102

0 commit comments

Comments
 (0)