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

Commit 4c29788

Browse files
committed
check notification in RepoChanged instead
1 parent 7176205 commit 4c29788

File tree

1 file changed

+12
-10
lines changed

1 file changed

+12
-10
lines changed

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

Lines changed: 12 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -75,31 +75,33 @@ protected async override void RepoChanged(bool changed)
7575
RepoName = ActiveRepoName;
7676
RepoUrl = ActiveRepoUri.ToString();
7777
Icon = GetIcon(false, true, false);
78+
79+
// We want to display a welcome message but only if Team Explorer isn't
80+
// already displaying the "Install 3rd Party Tools" message and the current repo is hosted on GitHub.
81+
if (!settings.HideTeamExplorerWelcomeMessage && !IsGitToolsMessageVisible())
82+
{
83+
ShowWelcomeMessage();
84+
}
85+
7886
Debug.Assert(SimpleApiClient != null,
7987
"If we're in this block, simpleApiClient cannot be null. It was created by UpdateStatus");
8088
var repo = await SimpleApiClient.GetRepository();
8189
Icon = GetIcon(repo.Private, true, repo.Fork);
8290
IsLoggedIn = IsUserAuthenticated();
8391
}
92+
else
93+
{
94+
teamExplorerServices.HideNotification(welcomeMessageGuid);
95+
}
8496
}
8597

8698
public override async void Refresh()
8799
{
88100
IsVisible = await IsAGitHubRepo();
89101
if (IsVisible)
90102
{
91-
// We want to display a welcome message but only if Team Explorer isn't
92-
// already displaying the "Install 3rd Party Tools" message and the current repo is hosted on GitHub.
93-
if (!settings.HideTeamExplorerWelcomeMessage && !IsGitToolsMessageVisible())
94-
{
95-
ShowWelcomeMessage();
96-
}
97103
IsLoggedIn = IsUserAuthenticated();
98104
}
99-
else
100-
{
101-
teamExplorerServices.HideNotification(welcomeMessageGuid);
102-
}
103105

104106
base.Refresh();
105107
}

0 commit comments

Comments
 (0)