Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix off by one when selecting steps view #1524

Merged
merged 4 commits into from
Jun 27, 2018
Merged

Fix off by one when selecting steps view #1524

merged 4 commits into from
Jun 27, 2018

Conversation

bsudekum
Copy link
Contributor

Closes: #1497

There were a handful of issues here:

  • We were using the currentLegProgress. This means you can only look at steps on the current leg.
  • sections is continually being groomed and only includes the remaining steps. We need to make sure the selected index maps correctly to the correct step.

/cc @frederoni @JThramer

Copy link
Contributor

@JThramer JThramer left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

One minor nit-pick, looks great otherwise!
:shipit:

stepIndex = indexPath.row
} else {
stepIndex = indexPath.row + routeProgress.currentLegProgress.stepIndex
stepIndex += indexPath.row + 1 > sections[indexPath.section].count ? 0 : 1
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can you add a comment describing in brief what happens here? This almost casually reads as a mistake.

@bsudekum bsudekum merged commit 245901d into master Jun 27, 2018
@bsudekum bsudekum deleted the fix-off-by-one branch June 27, 2018 16:35
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants