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

Commit 348122a

Browse files
author
Dan Schulte
committed
Add compiler conditions within ShowPublishSection to only use IGitActionsExt2 under 16.0
1 parent 8186791 commit 348122a

File tree

1 file changed

+7
-0
lines changed

1 file changed

+7
-0
lines changed

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

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -67,8 +67,15 @@ public void ShowHomePage()
6767

6868
public void ShowPublishSection()
6969
{
70+
#if TEAMEXPLORER14 || TEAMEXPLORER15
71+
var te = serviceProvider.TryGetService<ITeamExplorer>();
72+
var page = te.NavigateToPage(new Guid(TeamExplorerPageIds.GitCommits), null);
73+
var publish = page?.GetSection(new Guid(GitHubPublishSection.GitHubPublishSectionId)) as GitHubPublishSection;
74+
publish?.Connect();
75+
#else
7076
IGitActionsExt2 gitActionsExt = serviceProvider.TryGetService<IGitActionsExt2>();
7177
gitActionsExt?.InitializeOrPushRepositoryToGitService();
78+
#endif
7279
}
7380

7481
public async Task ShowRepositorySettingsRemotesAsync()

0 commit comments

Comments
 (0)