From 71b458ed1d6e7691feccbf38d47ebd052eb39128 Mon Sep 17 00:00:00 2001 From: Ilya Grechuhin Date: Tue, 15 Sep 2015 18:19:38 +0300 Subject: [PATCH] [ios] Updated console logic. --- .../MapViewControls/Search/Console/MWMConsole.mm | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/iphone/Maps/Classes/CustomViews/MapViewControls/Search/Console/MWMConsole.mm b/iphone/Maps/Classes/CustomViews/MapViewControls/Search/Console/MWMConsole.mm index 92944f0d02..7588f8ec8b 100644 --- a/iphone/Maps/Classes/CustomViews/MapViewControls/Search/Console/MWMConsole.mm +++ b/iphone/Maps/Classes/CustomViews/MapViewControls/Search/Console/MWMConsole.mm @@ -24,13 +24,12 @@ extern NSString * const kMwmTextToSpeechDisable; // Hook for shell command on change map style BOOL const isDark = [cmd isEqualToString:@"mapstyle:dark"] || [cmd isEqualToString:@"?dark"]; BOOL const isLight = isDark ? NO : [cmd isEqualToString:@"mapstyle:light"] || [cmd isEqualToString:@"?light"]; - BOOL const isClear = isLight || isDark ? NO : [cmd isEqualToString:@"?newstyle"]; + BOOL const isOld = isLight || isDark ? NO : [cmd isEqualToString:@"?oldstyle"]; - if (!isDark && !isLight && !isClear) + if (!isDark && !isLight && !isOld) return NO; - // change map style - MapStyle const mapStyle = isDark ? MapStyleDark : (isClear ? MapStyleClear : MapStyleLight); + MapStyle const mapStyle = isDark ? MapStyleDark : (isOld ? MapStyleLight : MapStyleClear); [[MapsAppDelegate theApp] setMapStyle: mapStyle]; return YES;