diff options
author | VladiMihaylenko <vxmihaylenko@gmail.com> | 2016-01-12 19:02:53 +0300 |
---|---|---|
committer | Constantin Shalnev <c.shalnev@corp.mail.ru> | 2016-01-13 15:55:41 +0300 |
commit | fd07960d400d9e8e5f64050e216d560d2c11f2fe (patch) | |
tree | c0cb5dad745f7c8f2f78a3caf6988e5f2364cd29 /iphone/Maps/Settings | |
parent | a64029d7a6c40194f9ef7f56c4921a17059b5249 (diff) |
[ios] Fixed merge's errors.
Diffstat (limited to 'iphone/Maps/Settings')
-rw-r--r-- | iphone/Maps/Settings/SettingsViewController.mm | 31 |
1 files changed, 21 insertions, 10 deletions
diff --git a/iphone/Maps/Settings/SettingsViewController.mm b/iphone/Maps/Settings/SettingsViewController.mm index 2506432f69..cd289ba7a9 100644 --- a/iphone/Maps/Settings/SettingsViewController.mm +++ b/iphone/Maps/Settings/SettingsViewController.mm @@ -65,15 +65,16 @@ typedef NS_ENUM(NSUInteger, Section) { switch (sections[section]) { - case SectionMetrics: - return 2; - case SectionMap: - case SectionRouting: - return 3; case SectionAd: case SectionStatistics: case SectionCalibration: return 1; + case SectionMetrics: + return 2; + case SectionRouting: + return 3; + case SectionMap: + return 4; } } @@ -120,15 +121,17 @@ typedef NS_ENUM(NSUInteger, Section) switch (indexPath.row) { // Night mode + // Recent track case 0: + case 1: { cell = [tableView dequeueReusableCellWithIdentifier:[LinkCell className]]; LinkCell * customCell = static_cast<LinkCell *>(cell); - customCell.titleLabel.text = L(@"pref_night_mode"); + customCell.titleLabel.text = indexPath.row == 0 ? L(@"pref_night_mode") : L(@"pref_recent_track"); break; } // 3D buildings - case 1: + case 2: { cell = [tableView dequeueReusableCellWithIdentifier:[SwitchCell className]]; SwitchCell * customCell = static_cast<SwitchCell *>(cell); @@ -137,7 +140,7 @@ typedef NS_ENUM(NSUInteger, Section) customCell.titleLabel.text = L(@"pref_map_3d_buildings_title"); } // Zoom buttons - case 2: + case 3: { cell = [tableView dequeueReusableCellWithIdentifier:[SwitchCell className]]; SwitchCell * customCell = static_cast<SwitchCell *>(cell); @@ -238,10 +241,12 @@ typedef NS_ENUM(NSUInteger, Section) switch (indexPath.row) { // Night mode + // Recent track case 0: + case 1: break; // 3D buildings - case 1: + case 2: { [[Statistics instance] logEvent:kStatEventName(kStatSettings, kStat3DBuildings) withParameters:@{kStatValue : (value ? kStatOn : kStatOff)}]; @@ -254,7 +259,7 @@ typedef NS_ENUM(NSUInteger, Section) break; } // Zoom buttons - case 2: + case 3: { [stat logEvent:kStatEventName(kStatSettings, kStatToggleZoomButtonsVisibility) withParameters:@{kStatValue : (value ? kStatVisible : kStatHidden)}]; @@ -336,6 +341,12 @@ Settings::Units unitsForIndex(NSInteger index) withParameters:@{kStatAction : kStatChangeNightMode}]; [self performSegueWithIdentifier:@"SettingsToNightMode" sender:nil]; } + else if (indexPath.row == 1) + { + [[Statistics instance] logEvent:kStatEventName(kStatSettings, kStatRecentTrack) + withParameters:@{kStatAction : kStatChangeRecentTrack}]; + [self performSegueWithIdentifier:@"SettingsToRecentTrackSegue" sender:nil]; + } break; case SectionAd: case SectionCalibration: |