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

Commit c770992

Browse files
committed
Fix refresh of PR list switching to "create" form.
Fixes #480. Issue was happening because of an extra PRCreation item in the nav stack when Refresh was clicked 2nd time. It was there because when navigating forward for the 2nd Create, GoForward method wasn't removing everything after the current item.
1 parent 6256763 commit c770992

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

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

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -279,8 +279,8 @@ void StartFlow(UIControllerFlow controllerFlow, [AllowNull]IConnection conn, Vie
279279
void GoForward(ViewWithData data)
280280
{
281281
currentNavItem++;
282-
if (currentNavItem < navStack.Count - 1)
283-
navStack.RemoveRange(currentNavItem, navStack.Count - 1 - currentNavItem);
282+
if (currentNavItem < navStack.Count)
283+
navStack.RemoveRange(currentNavItem, navStack.Count - currentNavItem);
284284
navStack.Add(data);
285285
}
286286

0 commit comments

Comments
 (0)