diff options
author | Ilya Grechuhin <i.grechuhin@gmail.com> | 2016-11-28 14:56:16 +0300 |
---|---|---|
committer | Ilya Grechuhin <i.grechuhin@gmail.com> | 2016-11-28 16:00:06 +0300 |
commit | fa1f7a6bd1400774f4f8d246dc8c751d5c9f1db9 (patch) | |
tree | 27dfd63f9914271d279149c3623d7474e19466b5 /iphone/Maps/Settings | |
parent | 5bcc41bf6ff502ed62aec6c3e61d742bdbcd57d9 (diff) |
[MAPSME-2994] [ios] Updated UI to support networking policy.
Diffstat (limited to 'iphone/Maps/Settings')
-rw-r--r-- | iphone/Maps/Settings/MWMSettingsViewController.mm | 10 |
1 files changed, 9 insertions, 1 deletions
diff --git a/iphone/Maps/Settings/MWMSettingsViewController.mm b/iphone/Maps/Settings/MWMSettingsViewController.mm index 4ebed5de25..f21b314e04 100644 --- a/iphone/Maps/Settings/MWMSettingsViewController.mm +++ b/iphone/Maps/Settings/MWMSettingsViewController.mm @@ -2,6 +2,7 @@ #import "LinkCell.h" #import "LocaleTranslator.h" #import "MWMAuthorizationCommon.h" +#import "MWMNetworkingPolicy.h" #import "MWMSettings.h" #import "MWMTextToSpeech.h" #import "Statistics.h" @@ -85,7 +86,14 @@ extern NSString * const kAlohalyticsTapEventKey; self.autoDownloadCell.switchButton.on = [MWMSettings autoDownloadEnabled]; self.autoDownloadCell.delegate = self; - self.mobileInternetCell.infoLabel.text = L(@"pref_ask"); + NSString * internetLabel = nil; + switch (networking_policy::GetNetworkingPolicyState()) + { + case networking_policy::NetworkingPolicyState::Always: internetLabel = L(@"pref_always"); break; + case networking_policy::NetworkingPolicyState::Session: internetLabel = L(@"pref_ask"); break; + case networking_policy::NetworkingPolicyState::Never: internetLabel = L(@"pref_never"); break; + } + self.mobileInternetCell.infoLabel.text = internetLabel; if (!GpsTracker::Instance().IsEnabled()) { |