[ios] Fixed tts button in routing.

This commit is contained in:
VladiMihaylenko 2016-12-16 11:28:54 +03:00 committed by Vladimir Byko-Ianko
parent 57e2887331
commit a09c03db5a

View file

@ -227,9 +227,9 @@ typedef NS_ENUM(NSUInteger, MWMBottomMenuViewCell) {
- (IBAction)routingStopTouchUpInside { [MWMRouter stopRouting]; }
- (IBAction)soundTouchUpInside:(MWMButton *)sender
{
BOOL const isEnable = sender.selected;
[Statistics logEvent:kStatMenu withParameters:@{kStatTTS : isEnable ? kStatOn : kStatOff}];
[MWMTextToSpeech tts].active = isEnable;
BOOL const isEnabled = sender.selected;
[Statistics logEvent:kStatMenu withParameters:@{kStatTTS : isEnabled ? kStatOn : kStatOff}];
[MWMTextToSpeech tts].active = !isEnabled;
[self refreshRoutingDiminishTimer];
}
@ -287,7 +287,7 @@ typedef NS_ENUM(NSUInteger, MWMBottomMenuViewCell) {
MWMButton * ttsButton = self.ttsSoundButton;
ttsButton.hidden = isPedestrianRouting || ![MWMTextToSpeech isTTSEnabled];
if (!ttsButton.hidden)
ttsButton.selected = ![MWMTextToSpeech tts].active;
ttsButton.selected = [MWMTextToSpeech tts].active;
}
#pragma mark - UICollectionViewDataSource