Skip to content

Commit 17b403b

Browse files
authored
Fix an issue where maneuver arrow wasn't removed after passing visual instruction on CarPlay. (#3987)
1 parent d3fd83e commit 17b403b

File tree

2 files changed

+9
-3
lines changed

2 files changed

+9
-3
lines changed

CHANGELOG.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -45,6 +45,7 @@
4545
* Fixed an issue where a `StyleManager` for CarPlay would update the appearance on both CarPlay and the iOS device simultaneously. ([#3914](https://github.com/mapbox/mapbox-navigation-ios/pull/3914))
4646
* During the navigating activity, the user can tap the "Alternatives" button in the navigation bar to switch to an alternative route. ([#3956](https://github.com/mapbox/mapbox-navigation-ios/pull/3956))
4747
* Fixed an issue where an appearance change of CarPlay would cause an appearance change of iOS as well. Refer to `DayStyle` while implementing custom styles using `Style` class. ([#3922](https://github.com/mapbox/mapbox-navigation-ios/pull/3922))
48+
* Fixed an issue where maneuver arrow wasn't removed after passing visual instruction on CarPlay. ([#3987](https://github.com/mapbox/mapbox-navigation-ios/pull/3987))
4849

4950
### Other changes
5051

Sources/MapboxNavigation/CarPlayNavigationViewController.swift

Lines changed: 8 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -722,9 +722,14 @@ open class CarPlayNavigationViewController: UIViewController, BuildingHighlighti
722722

723723
updateManeuvers(routeProgress)
724724
navigationMapView?.showWaypoints(on: routeProgress.route)
725-
navigationMapView?.addArrow(route: routeProgress.route,
726-
legIndex: routeProgress.legIndex,
727-
stepIndex: routeProgress.currentLegProgress.stepIndex + 1)
725+
726+
if routeProgress.currentLegProgress.followOnStep != nil {
727+
navigationMapView?.addArrow(route: routeProgress.route,
728+
legIndex: routeProgress.legIndex,
729+
stepIndex: routeProgress.currentLegProgress.stepIndex + 1)
730+
} else {
731+
navigationMapView?.removeArrow()
732+
}
728733
}
729734

730735
@objc func progressDidChange(_ notification: NSNotification) {

0 commit comments

Comments
 (0)