[ios] refactor: MWMSettingsViewController.mm formatting

Signed-off-by: Kiryl Kaveryn <kirylkaveryn@gmail.com>
This commit is contained in:
Kiryl Kaveryn 2024-02-02 12:56:03 +04:00 committed by Alexander Borsuk
parent 8842618c29
commit f4aa09b0cb

View file

@ -52,12 +52,12 @@ using namespace power_management;
}
- (void)configProfileSection {
NSString *userName = osm_auth_ios::OSMUserName();
NSString * userName = osm_auth_ios::OSMUserName();
[self.profileCell configWithTitle:L(@"profile") info:userName.length != 0 ? userName : @""];
}
- (void)configCommonSection {
NSString *units = nil;
NSString * units = nil;
switch ([MWMSettings measurementUnits]) {
case MWMUnitsMetric:
units = L(@"kilometres");
@ -76,8 +76,8 @@ using namespace power_management;
{
self.is3dCell.isEnabled = false;
[self.is3dCell configWithDelegate:self title:L(@"pref_map_3d_buildings_title") isOn:false];
UITapGestureRecognizer* tapRecogniser = [[UITapGestureRecognizer alloc] initWithTarget:self
action:@selector(show3dBuildingsAlert:)];
UITapGestureRecognizer * tapRecogniser = [[UITapGestureRecognizer alloc] initWithTarget:self
action:@selector(show3dBuildingsAlert:)];
self.is3dCell.gestureRecognizers = @[tapRecogniser];
}
@ -92,7 +92,7 @@ using namespace power_management;
title:L(@"autodownload")
isOn:[MWMSettings autoDownloadEnabled]];
NSString *mobileInternet = nil;
NSString * mobileInternet = nil;
switch ([MWMNetworkPolicy sharedPolicy].permission) {
case MWMNetworkPolicyPermissionAlways:
mobileInternet = L(@"mobile_data_option_always");
@ -108,7 +108,7 @@ using namespace power_management;
}
[self.mobileInternetCell configWithTitle:L(@"mobile_data") info:mobileInternet];
NSString *powerManagement = nil;
NSString * powerManagement = nil;
switch (GetFramework().GetPowerManager().GetScheme()) {
case Scheme::None:
break;
@ -126,7 +126,7 @@ using namespace power_management;
}
[self.powerManagementCell configWithTitle:L(@"power_managment_title") info:powerManagement];
NSString *recentTrack = nil;
NSString * recentTrack = nil;
if (!GpsTracker::Instance().IsEnabled()) {
recentTrack = L(@"duration_disabled");
} else {
@ -163,7 +163,7 @@ using namespace power_management;
title:L(@"pref_calibration_title")
isOn:[MWMSettings compassCalibrationEnabled]];
NSString *nightMode = nil;
NSString * nightMode = nil;
switch ([MWMSettings theme]) {
case MWMThemeVehicleDay:
NSAssert(false, @"Invalid case");
@ -183,12 +183,12 @@ using namespace power_management;
}
- (void)show3dBuildingsAlert:(UITapGestureRecognizer *)recognizer {
UIAlertController *alert =
[UIAlertController alertControllerWithTitle:L(@"pref_map_3d_buildings_title")
UIAlertController * alert =
[UIAlertController alertControllerWithTitle:L(@"pref_map_3d_buildings_title")
message:L(@"pref_map_3d_buildings_disabled_summary")
preferredStyle:UIAlertControllerStyleAlert];
UIAlertAction *okButton = [UIAlertAction actionWithTitle:@"OK"
UIAlertAction * okButton = [UIAlertAction actionWithTitle:@"OK"
style:UIAlertActionStyleDefault
handler:nil];
[alert addAction:okButton];
@ -204,7 +204,7 @@ using namespace power_management;
[self.autoZoomCell configWithDelegate:self title:L(@"pref_map_auto_zoom") isOn:GetFramework().LoadAutoZoom()];
NSString *ttsEnabledString = [MWMTextToSpeech isTTSEnabled] ? L(@"on") : L(@"off");
NSString * ttsEnabledString = [MWMTextToSpeech isTTSEnabled] ? L(@"on") : L(@"off");
[self.voiceInstructionsCell configWithTitle:L(@"pref_tts_enable_title") info:ttsEnabledString];
[self.drivingOptionsCell configWithTitle:L(@"driving_options_title") info:@""];
}