diff --git a/iphone/Maps/Settings/SettingsViewController.mm b/iphone/Maps/Settings/SettingsViewController.mm index fd69b56d0f..542be8f860 100644 --- a/iphone/Maps/Settings/SettingsViewController.mm +++ b/iphone/Maps/Settings/SettingsViewController.mm @@ -73,7 +73,7 @@ typedef NS_ENUM(NSUInteger, Section) case SectionMetrics: return 2; case SectionRouting: - return 3; + return 4; case SectionMap: return 5; } @@ -196,8 +196,18 @@ typedef NS_ENUM(NSUInteger, Section) customCell.delegate = self; break; } - // Change TTS language + // Allow autozoom case 2: + { + cell = [tableView dequeueReusableCellWithIdentifier:[SwitchCell className]]; + SwitchCell * customCell = static_cast(cell); + customCell.switchButton.on = GetFramework().LoadAutoZoom(); + customCell.titleLabel.text = L(@"pref_autozoom_enable_title"); + customCell.delegate = self; + break; + } + // Change TTS language + case 3: { cell = [tableView dequeueReusableCellWithIdentifier:[LinkCell className]]; LinkCell * customCell = (LinkCell *)cell; @@ -320,6 +330,15 @@ typedef NS_ENUM(NSUInteger, Section) withParameters:@{kStatValue : value ? kStatOn : kStatOff}]; [MWMTextToSpeech setTTSEnabled:value]; } + // Enable autozoom + else if (indexPath.row == 2) + { + [Statistics logEvent:kStatEventName(kStatSettings, kStatAutoZoom) + withParameters:@{kStatValue : value ? kStatOn : kStatOff}]; + auto & f = GetFramework(); + f.AllowAutoZoom(value); + f.SaveAutoZoom(value); + } break; case SectionMetrics: diff --git a/iphone/Maps/Statistics/StatisticsStrings.h b/iphone/Maps/Statistics/StatisticsStrings.h index 07a12f15d7..5f0a8f2b57 100644 --- a/iphone/Maps/Statistics/StatisticsStrings.h +++ b/iphone/Maps/Statistics/StatisticsStrings.h @@ -14,6 +14,7 @@ static NSString * const kStatApplication = @"Application"; static NSString * const kStatApply = @"Apply"; static NSString * const kStatAuthorization = @"Authorization"; static NSString * const kStatAutoDownload = @"Auto download"; +static NSString * const kStatAutoZoom = @"Autozoom"; static NSString * const kStatBack = @"Back"; static NSString * const kStatBannerDescription = @"Banner description"; static NSString * const kStatBannerTitle = @"Banner title";