mapbox / mapbox/mapbox-navigation-android
MapboxManeuverView does not handle error result
Nobody has claimed this yet.
- Dominant language
- Kotlin
- Stars
- 651
- Forks
- 321
- PR merge metrics
- No merged PRs in 30d
Description
`MapboxManeuverView` currently renders maneuvers only when the result is Success and the components list is not empty
```
fun renderManeuvers(maneuvers: Expected>) {
maneuvers.onValue { list ->
if (list.isNotEmpty()) {
currentlyRenderedManeuvers.clear()
currentlyRenderedManeuvers.addAll(list)
renderManeuvers()
}
}
}
```
In this case if the list is empty or the result is `error`, then the view would continue to show previous maneuver.
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start at MapboxManeuverView.renderManeuvers and trace both Expected branches. Reproduce an empty-list and error result after a prior successful render; done means the previous maneuver is no longer shown in either case, with regression coverage in the relevant existing test area.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- kotlin
- Domain
- mobile
- Issue type
- Bug
- Difficulty
- 2/5
- Estimated time
- 1-3 hours
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 38/100