forked from organicmaps/organicmaps
[MAPSME-4329] [ios] Limited vehicle themes to vehicle routing.
This commit is contained in:
parent
6262723485
commit
d31010bd60
1 changed files with 4 additions and 4 deletions
|
@ -10,14 +10,14 @@ final class ThemeManager: NSObject {
|
|||
|
||||
private func update(theme: MWMTheme) {
|
||||
let actualTheme: MWMTheme = { theme in
|
||||
let isRoutingActive = MWMRouter.isRoutingActive()
|
||||
let isVehicleRouting = MWMRouter.isRoutingActive() && (MWMRouter().type == .vehicle)
|
||||
switch theme {
|
||||
case .day: fallthrough
|
||||
case .vehicleDay: return isRoutingActive ? .vehicleDay : .day
|
||||
case .vehicleDay: return isVehicleRouting ? .vehicleDay : .day
|
||||
case .night: fallthrough
|
||||
case .vehicleNight: return isRoutingActive ? .vehicleNight : .night
|
||||
case .vehicleNight: return isVehicleRouting ? .vehicleNight : .night
|
||||
case .auto:
|
||||
guard isRoutingActive else { return .day }
|
||||
guard isVehicleRouting else { return .day }
|
||||
switch MWMFrameworkHelper.daytime() {
|
||||
case .day: return .vehicleDay
|
||||
case .night: return .vehicleNight
|
||||
|
|
Loading…
Add table
Reference in a new issue