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

Commit ffc51af

Browse files
committed
Make sure the toolbar is reset when the controller is stopped
1 parent 8a514ca commit ffc51af

File tree

1 file changed

+6
-7
lines changed

1 file changed

+6
-7
lines changed

src/GitHub.VisualStudio/UI/Views/GitHubPaneViewModel.cs

Lines changed: 6 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -118,13 +118,7 @@ async Task Reload([AllowNull] ViewWithData data = null, bool navigating = false)
118118

119119
if (!IsGitHubRepo.Value)
120120
{
121-
if (uiController != null)
122-
{
123-
Stop();
124-
//var factory = ServiceProvider.GetExportedValue<IUIFactory>();
125-
//var c = factory.CreateViewAndViewModel(UIViewType.LoggedOut);
126-
//Control = c.View;
127-
}
121+
Stop();
128122
return;
129123
}
130124

@@ -249,12 +243,17 @@ void DisableButtons()
249243

250244
void Stop()
251245
{
246+
if (uiController == null)
247+
return;
248+
249+
DisableButtons();
252250
windowController?.Close();
253251
uiController.Stop();
254252
disposables.Clear();
255253
uiController = null;
256254
currentNavItem = -1;
257255
navStack.Clear();
256+
UpdateToolbar();
258257
}
259258

260259
string title;

0 commit comments

Comments
 (0)