-
Notifications
You must be signed in to change notification settings - Fork 319
NAVAND-940: fix buildings highlighting #6754
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
Conversation
Codecov Report
@@ Coverage Diff @@
## main #6754 +/- ##
=========================================
Coverage 72.54% 72.54%
- Complexity 5521 5522 +1
=========================================
Files 772 772
Lines 29888 29899 +11
Branches 3531 3533 +2
=========================================
+ Hits 21682 21691 +9
Misses 6793 6793
- Partials 1413 1415 +2
|
libnavigation-base/src/main/java/com/mapbox/navigation/base/internal/extensions/WaypointEx.kt
Outdated
Show resolved
Hide resolved
libnavui-maps/src/main/java/com/mapbox/navigation/ui/maps/building/BuildingProcessor.kt
Outdated
Show resolved
Hide resolved
| val prevEVWaypointsCount = legWaypoints.take(legWaypointIndex + 1) | ||
| .count { it.isEVChargingWaypoint() } |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
nit
it was hard to get the idea at the first glance. Up to you
| val prevEVWaypointsCount = legWaypoints.take(legWaypointIndex + 1) | |
| .count { it.isEVChargingWaypoint() } | |
| val coordinateIdx = waypoints.map { it.isRequestedWaypoints }.indexOf(waypoints.map {it.isLegWaypoint }[legWaypointIndex]) | |
| return progress.navigationRoute.routeOptions.coordinatesList() | |
| .getOrNull(coordinateIdx) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I don't want to use indexOf. In case the equality check of waypoints is broken or something. I know it sounds weird but it's less strict than counting the number of "bad" waypoints and subtracting them.
I rewrote it in terms of requested waypoints, nothing EV related remains.
c6d5aef to
f551592
Compare
No description provided.