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

Commit 7176205

Browse files
committed
hide welcome message when not visible
1 parent 522c2c7 commit 7176205

File tree

1 file changed

+8
-6
lines changed

1 file changed

+8
-6
lines changed

src/GitHub.TeamFoundation.14/Home/GitHubHomeSection.cs

Lines changed: 8 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -26,6 +26,7 @@ public class GitHubHomeSection : TeamExplorerSectionBase, IGitHubHomeSection
2626
{
2727
public const string GitHubHomeSectionId = "72008232-2104-4FA0-A189-61B0C6F91198";
2828
const string TrainingUrl = "https://services.github.com/on-demand/windows/visual-studio";
29+
readonly static Guid welcomeMessageGuid = new Guid(Guids.TeamExplorerWelcomeMessage);
2930

3031
readonly IVisualStudioBrowser visualStudioBrowser;
3132
readonly ITeamExplorerServices teamExplorerServices;
@@ -89,15 +90,17 @@ public override async void Refresh()
8990
{
9091
// We want to display a welcome message but only if Team Explorer isn't
9192
// already displaying the "Install 3rd Party Tools" message and the current repo is hosted on GitHub.
92-
if (!settings.HideTeamExplorerWelcomeMessage)
93+
if (!settings.HideTeamExplorerWelcomeMessage && !IsGitToolsMessageVisible())
9394
{
94-
if (!IsGitToolsMessageVisible())
95-
{
96-
ShowWelcomeMessage();
97-
}
95+
ShowWelcomeMessage();
9896
}
9997
IsLoggedIn = IsUserAuthenticated();
10098
}
99+
else
100+
{
101+
teamExplorerServices.HideNotification(welcomeMessageGuid);
102+
}
103+
101104
base.Refresh();
102105
}
103106

@@ -139,7 +142,6 @@ void DoOpenOnGitHub()
139142

140143
void ShowWelcomeMessage()
141144
{
142-
var welcomeMessageGuid = new Guid(Guids.TeamExplorerWelcomeMessage);
143145
teamExplorerServices.ShowMessage(
144146
Resources.TeamExplorerWelcomeMessage,
145147
new RelayCommand(o =>

0 commit comments

Comments
 (0)