diff options
author | Alex Zolotarev <alex@maps.me> | 2015-08-10 19:51:02 +0300 |
---|---|---|
committer | Alex Zolotarev <alex@maps.me> | 2015-09-23 03:00:34 +0300 |
commit | 4b705bff53c9961b9bb36561444fce4fe0840dad (patch) | |
tree | bdc7bf91ca903a74c650e62890d6e9dc16af1c4a /iphone | |
parent | a8a4c3f15118901ba28465e297049d992b091b66 (diff) |
[ios] Fixed “Zoom buttons should be enabled by default”.
Diffstat (limited to 'iphone')
-rw-r--r-- | iphone/Maps/Classes/CustomViews/MapViewControls/ZoomButtons/MWMZoomButtons.mm | 5 | ||||
-rw-r--r-- | iphone/Maps/Classes/MapViewController.mm | 2 | ||||
-rw-r--r-- | iphone/Maps/Settings/SettingsViewController.mm | 2 |
3 files changed, 3 insertions, 6 deletions
diff --git a/iphone/Maps/Classes/CustomViews/MapViewControls/ZoomButtons/MWMZoomButtons.mm b/iphone/Maps/Classes/CustomViews/MapViewControls/ZoomButtons/MWMZoomButtons.mm index 426ca6f488..72b4fd5c0b 100644 --- a/iphone/Maps/Classes/CustomViews/MapViewControls/ZoomButtons/MWMZoomButtons.mm +++ b/iphone/Maps/Classes/CustomViews/MapViewControls/ZoomButtons/MWMZoomButtons.mm @@ -106,9 +106,8 @@ extern NSString * const kAlohalyticsTapEventKey; - (BOOL)isZoomEnabled { - bool zoomButtonsEnabled; - if (!Settings::Get("ZoomButtonsEnabled", zoomButtonsEnabled)) - zoomButtonsEnabled = false; + bool zoomButtonsEnabled = true; + (void)Settings::Get("ZoomButtonsEnabled", zoomButtonsEnabled); return zoomButtonsEnabled; } diff --git a/iphone/Maps/Classes/MapViewController.mm b/iphone/Maps/Classes/MapViewController.mm index 808b8fd8b4..2506d3750b 100644 --- a/iphone/Maps/Classes/MapViewController.mm +++ b/iphone/Maps/Classes/MapViewController.mm @@ -593,8 +593,6 @@ typedef NS_OPTIONS(NSUInteger, MapInfoView) if ((self = [super initWithCoder:coder])) { Framework & f = GetFramework(); - if ([Alohalytics isFirstSession]) - Settings::Set("ZoomButtonsEnabled", true); typedef void (*UserMarkActivatedFnT)(id, SEL, unique_ptr<UserMarkCopy>); typedef void (*PlacePageDismissedFnT)(id, SEL); diff --git a/iphone/Maps/Settings/SettingsViewController.mm b/iphone/Maps/Settings/SettingsViewController.mm index 1b1c672e96..b5c2e240da 100644 --- a/iphone/Maps/Settings/SettingsViewController.mm +++ b/iphone/Maps/Settings/SettingsViewController.mm @@ -91,7 +91,7 @@ typedef NS_ENUM(NSUInteger, Section) { cell = [tableView dequeueReusableCellWithIdentifier:[SwitchCell className]]; SwitchCell * customCell = (SwitchCell *)cell; - bool on; + bool on = true; (void)Settings::Get("ZoomButtonsEnabled", on); customCell.switchButton.on = on; customCell.titleLabel.text = L(@"pref_zoom_title"); |