[ios] Exchanged autozoom in tts in settings.

This commit is contained in:
VladiMihaylenko 2016-07-20 11:40:04 +03:00
parent 1a747883ca
commit 8c9d8ca02e

View file

@ -186,18 +186,8 @@ typedef NS_ENUM(NSUInteger, Section)
customCell.switchButton.on = on;
break;
}
// Enable TTS
case 1:
{
cell = [tableView dequeueReusableCellWithIdentifier:[SwitchCell className]];
SwitchCell * customCell = (SwitchCell *)cell;
customCell.switchButton.on = [MWMTextToSpeech isTTSEnabled];
customCell.titleLabel.text = L(@"pref_tts_enable_title");
customCell.delegate = self;
break;
}
// Allow autozoom
case 2:
case 1:
{
cell = [tableView dequeueReusableCellWithIdentifier:[SwitchCell className]];
SwitchCell * customCell = static_cast<SwitchCell *>(cell);
@ -206,6 +196,16 @@ typedef NS_ENUM(NSUInteger, Section)
customCell.delegate = self;
break;
}
// Enable TTS
case 2:
{
cell = [tableView dequeueReusableCellWithIdentifier:[SwitchCell className]];
SwitchCell * customCell = (SwitchCell *)cell;
customCell.switchButton.on = [MWMTextToSpeech isTTSEnabled];
customCell.titleLabel.text = L(@"pref_tts_enable_title");
customCell.delegate = self;
break;
}
// Change TTS language
case 3:
{
@ -323,15 +323,8 @@ typedef NS_ENUM(NSUInteger, Section)
f.Save3dMode(is3d, _);
f.Allow3dMode(is3d, _);
}
// Enable TTS
else if (indexPath.row == 1)
{
[Statistics logEvent:kStatEventName(kStatSettings, kStatTTS)
withParameters:@{kStatValue : value ? kStatOn : kStatOff}];
[MWMTextToSpeech setTTSEnabled:value];
}
// Enable autozoom
else if (indexPath.row == 2)
else if (indexPath.row == 1)
{
[Statistics logEvent:kStatEventName(kStatSettings, kStatAutoZoom)
withParameters:@{kStatValue : value ? kStatOn : kStatOff}];
@ -339,6 +332,13 @@ typedef NS_ENUM(NSUInteger, Section)
f.AllowAutoZoom(value);
f.SaveAutoZoom(value);
}
// Enable TTS
else if (indexPath.row == 2)
{
[Statistics logEvent:kStatEventName(kStatSettings, kStatTTS)
withParameters:@{kStatValue : value ? kStatOn : kStatOff}];
[MWMTextToSpeech setTTSEnabled:value];
}
break;
case SectionMetrics: