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

Update distance completed in off route scenario #568

Merged
merged 3 commits into from
Dec 6, 2017
Merged

Conversation

danesfeder
Copy link
Contributor

No description provided.

@danesfeder danesfeder added the bug Defect to be fixed. label Dec 5, 2017
@danesfeder danesfeder self-assigned this Dec 5, 2017
@@ -110,6 +110,7 @@ public void onRouteProgressUpdate(RouteProgress routeProgress) {

@Override
public void onOffRouteEvent(Location offRouteLocation) {
updateDistanceCompleted();
isOffRoute = true;
Copy link
Contributor

Choose a reason for hiding this comment

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

Since we're setting isOffRoute = true here, do we want to add a guard at the top checking isOffRoute == false and returning early, so we don't accidentally call updateDistanceCompleted() and queueRerouteEvent() again if onOffRouteEvent is ever called more than once?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Yeah good call -- will add and merge

@danesfeder danesfeder merged commit b272bb6 into master Dec 6, 2017
@danesfeder danesfeder deleted the dan-distance-bug branch December 6, 2017 15:15
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Defect to be fixed.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants