diff options
author | Ilya Grechuhin <i.grechuhin@gmail.com> | 2016-12-09 15:42:42 +0300 |
---|---|---|
committer | Ilya Grechuhin <i.grechuhin@gmail.com> | 2016-12-09 15:42:42 +0300 |
commit | 2ffb3c9fb7817976bf2dc8290a61d91a258fda2e (patch) | |
tree | c08ebcf9cd1cca60ff00efac91921ef163012a69 /iphone/Maps/Settings | |
parent | 12e04098d153418bd3c95b076007ab3b0f5da78e (diff) |
[adForbidden] [ios] Added «show offers» switch to settings.
Diffstat (limited to 'iphone/Maps/Settings')
-rw-r--r-- | iphone/Maps/Settings/MWMSettingsViewController.mm | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/iphone/Maps/Settings/MWMSettingsViewController.mm b/iphone/Maps/Settings/MWMSettingsViewController.mm index 440a394cdc..881db9ec5d 100644 --- a/iphone/Maps/Settings/MWMSettingsViewController.mm +++ b/iphone/Maps/Settings/MWMSettingsViewController.mm @@ -28,6 +28,7 @@ extern NSString * const kAlohalyticsTapEventKey; @property(weak, nonatomic) IBOutlet LinkCell * mobileInternetCell; @property(weak, nonatomic) IBOutlet LinkCell * recentTrackCell; @property(weak, nonatomic) IBOutlet SwitchCell * compassCalibrationCell; +@property(weak, nonatomic) IBOutlet SwitchCell * showOffersCell; @property(weak, nonatomic) IBOutlet SwitchCell * statisticsCell; @property(weak, nonatomic) IBOutlet LinkCell * nightModeCell; @@ -116,6 +117,9 @@ extern NSString * const kAlohalyticsTapEventKey; self.compassCalibrationCell.switchButton.on = [MWMSettings compassCalibrationEnabled]; self.compassCalibrationCell.delegate = self; + self.showOffersCell.switchButton.on = ![MWMSettings adForbidden]; + self.showOffersCell.delegate = self; + self.statisticsCell.switchButton.on = [MWMSettings statisticsEnabled]; self.statisticsCell.delegate = self; } @@ -196,6 +200,12 @@ extern NSString * const kAlohalyticsTapEventKey; withParameters:@{kStatValue : (value ? kStatOn : kStatOff)}]; [MWMSettings setCompassCalibrationEnabled:value]; } + else if (cell == self.showOffersCell) + { + [Statistics logEvent:kStatEventName(kStatSettings, kStatAd) + withParameters:@{kStatAction : kStatAd, kStatValue : (value ? kStatOn : kStatOff)}]; + [MWMSettings setAdForbidden:!value]; + } else if (cell == self.statisticsCell) { [Statistics logEvent:kStatEventName(kStatSettings, kStatToggleStatistics) |