[ios] Handle distinct FollowAndRotateRoute and FollowAndRotateCompass modes

Signed-off-by: Leonardo Bishop <me@leonardobishop.net>
This commit is contained in:
Leonardo Bishop
2025-12-18 01:33:08 +00:00
committed by Konstantin Pastbin
parent ee4675b388
commit d448369c04
18 changed files with 110 additions and 15 deletions

View File

@@ -239,7 +239,7 @@ final class CarPlayService: NSObject {
MapTemplateBuilder.configureBaseUI(mapTemplate: mapTemplate)
if currentPositionMode == .pendingPosition {
mapTemplate.leadingNavigationBarButtons = []
} else if currentPositionMode == .follow || currentPositionMode == .followAndRotate {
} else if currentPositionMode == .follow || currentPositionMode == .followAndRotateCompass || currentPositionMode == .followAndRotateRoute {
MapTemplateBuilder.setupDestinationButton(mapTemplate: mapTemplate)
} else {
MapTemplateBuilder.setupRecenterButton(mapTemplate: mapTemplate)
@@ -629,7 +629,7 @@ extension CarPlayService: LocationModeListener {
return
}
switch mode {
case .follow, .followAndRotate:
case .follow, .followAndRotateCompass, .followAndRotateRoute:
if !rootMapTemplate.isPanningInterfaceVisible {
MapTemplateBuilder.setupDestinationButton(mapTemplate: rootMapTemplate)
}

View File

@@ -28,7 +28,7 @@ final class MapTemplateBuilder {
configureBaseUI(mapTemplate: mapTemplate)
if positionMode == .pendingPosition {
mapTemplate.leadingNavigationBarButtons = []
} else if positionMode == .follow || positionMode == .followAndRotate {
} else if positionMode == .follow || positionMode == .followAndRotateCompass || positionMode == .followAndRotateRoute {
setupDestinationButton(mapTemplate: mapTemplate)
} else {
setupRecenterButton(mapTemplate: mapTemplate)

View File

@@ -91,7 +91,8 @@ NSString * const kUDDidShowLongTapToShowSideButtonsToast = @"kUDDidShowLongTapTo
case MWMMyPositionModeNotFollow:
case MWMMyPositionModeNotFollowNoPosition: [locBtn setStyleNameAndApply: @"ButtonGetPosition"]; break;
case MWMMyPositionModeFollow: [locBtn setStyleNameAndApply: @"ButtonFollow"]; break;
case MWMMyPositionModeFollowAndRotate: [locBtn setStyleNameAndApply: @"ButtonFollowAndRotate"]; break;
case MWMMyPositionModeFollowAndRotateCompass: [locBtn setStyleNameAndApply: @"ButtonFollowAndRotateCompass"]; break;
case MWMMyPositionModeFollowAndRotateRoute: [locBtn setStyleNameAndApply: @"ButtonFollowAndRotateRoute"]; break;
}
}

View File

@@ -632,7 +632,8 @@ NSString *const kAboutSegue = @"Map2About";
case MWMMyPositionModeNotFollow:
break;
case MWMMyPositionModeFollow:
case MWMMyPositionModeFollowAndRotate:
case MWMMyPositionModeFollowAndRotateCompass:
case MWMMyPositionModeFollowAndRotateRoute:
self.disableStandbyOnLocationStateMode = YES;
break;
}