diff --git a/iphone/Maps/Classes/CustomViews/MapViewControls/BottomMenu/MWMBottomMenuViewController.mm b/iphone/Maps/Classes/CustomViews/MapViewControls/BottomMenu/MWMBottomMenuViewController.mm index 8caf4d98a8..885546d71e 100644 --- a/iphone/Maps/Classes/CustomViews/MapViewControls/BottomMenu/MWMBottomMenuViewController.mm +++ b/iphone/Maps/Classes/CustomViews/MapViewControls/BottomMenu/MWMBottomMenuViewController.mm @@ -197,17 +197,18 @@ typedef NS_ENUM(NSUInteger, MWMBottomMenuViewCell) { self.routingInfoPageControl.currentPage = (self.routingInfoPageControl.currentPage + 1) % self.routingInfoPageControl.numberOfPages; [self updateNavigationInfo:self.navigationInfo]; + [self refreshRoutingDiminishTimer]; } - (IBAction)routingStartTouchUpInside { [[MWMRouter router] start]; } - (IBAction)routingStopTouchUpInside { [[MWMRouter router] stop]; } - (IBAction)soundTouchUpInside:(MWMButton *)sender { - BOOL const isEnable = !sender.selected; + BOOL const isEnable = sender.selected; [Statistics logEvent:kStatEventName(kStatNavigationDashboard, isEnable ? kStatOn : kStatOff)]; - sender.coloring = isEnable ? MWMButtonColoringGray : MWMButtonColoringBlue; + sender.coloring = isEnable ? MWMButtonColoringBlue : MWMButtonColoringGray; [MWMTextToSpeech tts].active = isEnable; - sender.selected = isEnable; + [self refreshRoutingDiminishTimer]; } #pragma mark - Refresh Collection View layout @@ -253,7 +254,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 @@ -619,6 +620,7 @@ typedef NS_ENUM(NSUInteger, MWMBottomMenuViewCell) { [_ttsSoundButton setImage:[UIImage imageNamed:@"ic_voice_off"] forState:UIControlStateSelected]; [_ttsSoundButton setImage:[UIImage imageNamed:@"ic_voice_off"] forState:UIControlStateSelected | UIControlStateHighlighted]; + [self ttsButtonStatusChanged:nil]; } @end diff --git a/iphone/Maps/Classes/CustomViews/NavigationDashboard/Sound/MWMTextToSpeech.h b/iphone/Maps/Classes/CustomViews/NavigationDashboard/Sound/MWMTextToSpeech.h index e01ed08385..f56299335b 100644 --- a/iphone/Maps/Classes/CustomViews/NavigationDashboard/Sound/MWMTextToSpeech.h +++ b/iphone/Maps/Classes/CustomViews/NavigationDashboard/Sound/MWMTextToSpeech.h @@ -3,7 +3,7 @@ @interface MWMTextToSpeech : NSObject -+ (instancetype)tts; ++ (MWMTextToSpeech *)tts; + (BOOL)isTTSEnabled; + (void)setTTSEnabled:(BOOL)enabled; + (NSString *)savedLanguage; diff --git a/iphone/Maps/Classes/CustomViews/NavigationDashboard/Sound/MWMTextToSpeech.mm b/iphone/Maps/Classes/CustomViews/NavigationDashboard/Sound/MWMTextToSpeech.mm index 3390dd7a67..07d8d1efe1 100644 --- a/iphone/Maps/Classes/CustomViews/NavigationDashboard/Sound/MWMTextToSpeech.mm +++ b/iphone/Maps/Classes/CustomViews/NavigationDashboard/Sound/MWMTextToSpeech.mm @@ -56,7 +56,7 @@ vector> availableLanguages() @implementation MWMTextToSpeech -+ (instancetype)tts ++ (MWMTextToSpeech *)tts { static dispatch_once_t onceToken; static MWMTextToSpeech * tts = nil; @@ -106,6 +106,7 @@ vector> availableLanguages() { LOG(LWARNING, ("[ setCategory]] error.", [err localizedDescription])); } + self.active = YES; } return self; } @@ -145,10 +146,12 @@ vector> availableLanguages() if (active && ![self isValid]) [self createSynthesizer]; GetFramework().EnableTurnNotifications(active ? true : false); - [[NSNotificationCenter defaultCenter] - postNotificationName:[MWMTextToSpeech ttsStatusNotificationKey] - object:nil - userInfo:nil]; + runAsyncOnMainQueue(^{ + [[NSNotificationCenter defaultCenter] + postNotificationName:[MWMTextToSpeech ttsStatusNotificationKey] + object:nil + userInfo:nil]; + }); } - (BOOL)active diff --git a/iphone/Maps/Images.xcassets/NavigationDashboard/Then Turn/finish_point_then.imageset/Contents.json b/iphone/Maps/Images.xcassets/NavigationDashboard/Then Turn/finish_point_then.imageset/Contents.json index 34e77fa5ea..c904ac5d8b 100644 --- a/iphone/Maps/Images.xcassets/NavigationDashboard/Then Turn/finish_point_then.imageset/Contents.json +++ b/iphone/Maps/Images.xcassets/NavigationDashboard/Then Turn/finish_point_then.imageset/Contents.json @@ -19,5 +19,8 @@ "info" : { "version" : 1, "author" : "xcode" + }, + "properties" : { + "template-rendering-intent" : "template" } } \ No newline at end of file diff --git a/iphone/Maps/Images.xcassets/NavigationDashboard/Then Turn/round_then.imageset/Contents.json b/iphone/Maps/Images.xcassets/NavigationDashboard/Then Turn/round_then.imageset/Contents.json index 1cf6849fde..11fe8a75da 100644 --- a/iphone/Maps/Images.xcassets/NavigationDashboard/Then Turn/round_then.imageset/Contents.json +++ b/iphone/Maps/Images.xcassets/NavigationDashboard/Then Turn/round_then.imageset/Contents.json @@ -2,22 +2,25 @@ "images" : [ { "idiom" : "universal", - "scale" : "1x", - "filename" : "round_then.png" + "filename" : "round_then.png", + "scale" : "1x" }, { "idiom" : "universal", - "scale" : "2x", - "filename" : "round_then@2x.png" + "filename" : "round_then@2x.png", + "scale" : "2x" }, { "idiom" : "universal", - "scale" : "3x", - "filename" : "round_then@3x.png" + "filename" : "round_then@3x.png", + "scale" : "3x" } ], "info" : { "version" : 1, "author" : "xcode" + }, + "properties" : { + "template-rendering-intent" : "template" } } \ No newline at end of file diff --git a/iphone/Maps/Images.xcassets/NavigationDashboard/Then Turn/sharp_left_then.imageset/Contents.json b/iphone/Maps/Images.xcassets/NavigationDashboard/Then Turn/sharp_left_then.imageset/Contents.json index 35514f6914..66b158344d 100644 --- a/iphone/Maps/Images.xcassets/NavigationDashboard/Then Turn/sharp_left_then.imageset/Contents.json +++ b/iphone/Maps/Images.xcassets/NavigationDashboard/Then Turn/sharp_left_then.imageset/Contents.json @@ -2,22 +2,25 @@ "images" : [ { "idiom" : "universal", - "scale" : "1x", - "filename" : "sharp_left_then.png" + "filename" : "sharp_left_then.png", + "scale" : "1x" }, { "idiom" : "universal", - "scale" : "2x", - "filename" : "sharp_left_then@2x.png" + "filename" : "sharp_left_then@2x.png", + "scale" : "2x" }, { "idiom" : "universal", - "scale" : "3x", - "filename" : "sharp_left_then@3x.png" + "filename" : "sharp_left_then@3x.png", + "scale" : "3x" } ], "info" : { "version" : 1, "author" : "xcode" + }, + "properties" : { + "template-rendering-intent" : "template" } } \ No newline at end of file diff --git a/iphone/Maps/Images.xcassets/NavigationDashboard/Then Turn/sharp_right_then.imageset/Contents.json b/iphone/Maps/Images.xcassets/NavigationDashboard/Then Turn/sharp_right_then.imageset/Contents.json index 676e90504e..82b070bff1 100644 --- a/iphone/Maps/Images.xcassets/NavigationDashboard/Then Turn/sharp_right_then.imageset/Contents.json +++ b/iphone/Maps/Images.xcassets/NavigationDashboard/Then Turn/sharp_right_then.imageset/Contents.json @@ -2,22 +2,25 @@ "images" : [ { "idiom" : "universal", - "scale" : "1x", - "filename" : "sharp_right_then.png" + "filename" : "sharp_right_then.png", + "scale" : "1x" }, { "idiom" : "universal", - "scale" : "2x", - "filename" : "sharp_right_then@2x.png" + "filename" : "sharp_right_then@2x.png", + "scale" : "2x" }, { "idiom" : "universal", - "scale" : "3x", - "filename" : "sharp_right_then@3x.png" + "filename" : "sharp_right_then@3x.png", + "scale" : "3x" } ], "info" : { "version" : 1, "author" : "xcode" + }, + "properties" : { + "template-rendering-intent" : "template" } } \ No newline at end of file diff --git a/iphone/Maps/Images.xcassets/NavigationDashboard/Then Turn/simple_left_then.imageset/Contents.json b/iphone/Maps/Images.xcassets/NavigationDashboard/Then Turn/simple_left_then.imageset/Contents.json index dbcfe1d045..4bf5802f75 100644 --- a/iphone/Maps/Images.xcassets/NavigationDashboard/Then Turn/simple_left_then.imageset/Contents.json +++ b/iphone/Maps/Images.xcassets/NavigationDashboard/Then Turn/simple_left_then.imageset/Contents.json @@ -2,22 +2,25 @@ "images" : [ { "idiom" : "universal", - "scale" : "1x", - "filename" : "simple_left_then.png" + "filename" : "simple_left_then.png", + "scale" : "1x" }, { "idiom" : "universal", - "scale" : "2x", - "filename" : "simple_left_then@2x.png" + "filename" : "simple_left_then@2x.png", + "scale" : "2x" }, { "idiom" : "universal", - "scale" : "3x", - "filename" : "simple_left_then@3x.png" + "filename" : "simple_left_then@3x.png", + "scale" : "3x" } ], "info" : { "version" : 1, "author" : "xcode" + }, + "properties" : { + "template-rendering-intent" : "template" } } \ No newline at end of file diff --git a/iphone/Maps/Images.xcassets/NavigationDashboard/Then Turn/simple_right_then.imageset/Contents.json b/iphone/Maps/Images.xcassets/NavigationDashboard/Then Turn/simple_right_then.imageset/Contents.json index b8fcb76201..d75504b38a 100644 --- a/iphone/Maps/Images.xcassets/NavigationDashboard/Then Turn/simple_right_then.imageset/Contents.json +++ b/iphone/Maps/Images.xcassets/NavigationDashboard/Then Turn/simple_right_then.imageset/Contents.json @@ -2,22 +2,25 @@ "images" : [ { "idiom" : "universal", - "scale" : "1x", - "filename" : "simple_right_then.png" + "filename" : "simple_right_then.png", + "scale" : "1x" }, { "idiom" : "universal", - "scale" : "2x", - "filename" : "simple_right_then@2x.png" + "filename" : "simple_right_then@2x.png", + "scale" : "2x" }, { "idiom" : "universal", - "scale" : "3x", - "filename" : "simple_right_then@3x.png" + "filename" : "simple_right_then@3x.png", + "scale" : "3x" } ], "info" : { "version" : 1, "author" : "xcode" + }, + "properties" : { + "template-rendering-intent" : "template" } } \ No newline at end of file diff --git a/iphone/Maps/Images.xcassets/NavigationDashboard/Then Turn/slight_left_then.imageset/Contents.json b/iphone/Maps/Images.xcassets/NavigationDashboard/Then Turn/slight_left_then.imageset/Contents.json index fd884981fa..dbe3dd097a 100644 --- a/iphone/Maps/Images.xcassets/NavigationDashboard/Then Turn/slight_left_then.imageset/Contents.json +++ b/iphone/Maps/Images.xcassets/NavigationDashboard/Then Turn/slight_left_then.imageset/Contents.json @@ -2,22 +2,25 @@ "images" : [ { "idiom" : "universal", - "scale" : "1x", - "filename" : "slight_left_then.png" + "filename" : "slight_left_then.png", + "scale" : "1x" }, { "idiom" : "universal", - "scale" : "2x", - "filename" : "slight_left_then@2x.png" + "filename" : "slight_left_then@2x.png", + "scale" : "2x" }, { "idiom" : "universal", - "scale" : "3x", - "filename" : "slight_left_then@3x.png" + "filename" : "slight_left_then@3x.png", + "scale" : "3x" } ], "info" : { "version" : 1, "author" : "xcode" + }, + "properties" : { + "template-rendering-intent" : "template" } } \ No newline at end of file diff --git a/iphone/Maps/Images.xcassets/NavigationDashboard/Then Turn/slight_right_then.imageset/Contents.json b/iphone/Maps/Images.xcassets/NavigationDashboard/Then Turn/slight_right_then.imageset/Contents.json index f96fa78f17..b0fcff89c8 100644 --- a/iphone/Maps/Images.xcassets/NavigationDashboard/Then Turn/slight_right_then.imageset/Contents.json +++ b/iphone/Maps/Images.xcassets/NavigationDashboard/Then Turn/slight_right_then.imageset/Contents.json @@ -2,22 +2,25 @@ "images" : [ { "idiom" : "universal", - "scale" : "1x", - "filename" : "slight_right_then.png" + "filename" : "slight_right_then.png", + "scale" : "1x" }, { "idiom" : "universal", - "scale" : "2x", - "filename" : "slight_right_then@2x.png" + "filename" : "slight_right_then@2x.png", + "scale" : "2x" }, { "idiom" : "universal", - "scale" : "3x", - "filename" : "slight_right_then@3x.png" + "filename" : "slight_right_then@3x.png", + "scale" : "3x" } ], "info" : { "version" : 1, "author" : "xcode" + }, + "properties" : { + "template-rendering-intent" : "template" } } \ No newline at end of file diff --git a/iphone/Maps/Images.xcassets/NavigationDashboard/Then Turn/straight_then.imageset/Contents.json b/iphone/Maps/Images.xcassets/NavigationDashboard/Then Turn/straight_then.imageset/Contents.json index e9bffc2c8b..260de4cc97 100644 --- a/iphone/Maps/Images.xcassets/NavigationDashboard/Then Turn/straight_then.imageset/Contents.json +++ b/iphone/Maps/Images.xcassets/NavigationDashboard/Then Turn/straight_then.imageset/Contents.json @@ -2,22 +2,25 @@ "images" : [ { "idiom" : "universal", - "scale" : "1x", - "filename" : "straight_then.png" + "filename" : "straight_then.png", + "scale" : "1x" }, { "idiom" : "universal", - "scale" : "2x", - "filename" : "straight_then@2x.png" + "filename" : "straight_then@2x.png", + "scale" : "2x" }, { "idiom" : "universal", - "scale" : "3x", - "filename" : "straight_then@3x.png" + "filename" : "straight_then@3x.png", + "scale" : "3x" } ], "info" : { "version" : 1, "author" : "xcode" + }, + "properties" : { + "template-rendering-intent" : "template" } } \ No newline at end of file diff --git a/iphone/Maps/Images.xcassets/NavigationDashboard/Then Turn/uturn_left_right.imageset/Contents.json b/iphone/Maps/Images.xcassets/NavigationDashboard/Then Turn/uturn_left_right.imageset/Contents.json index 95b70f95e7..42054e68b4 100644 --- a/iphone/Maps/Images.xcassets/NavigationDashboard/Then Turn/uturn_left_right.imageset/Contents.json +++ b/iphone/Maps/Images.xcassets/NavigationDashboard/Then Turn/uturn_left_right.imageset/Contents.json @@ -19,5 +19,8 @@ "info" : { "version" : 1, "author" : "xcode" + }, + "properties" : { + "template-rendering-intent" : "template" } } \ No newline at end of file diff --git a/iphone/Maps/Images.xcassets/NavigationDashboard/Then Turn/uturn_left_then.imageset/Contents.json b/iphone/Maps/Images.xcassets/NavigationDashboard/Then Turn/uturn_left_then.imageset/Contents.json index 2a33b75b69..2d97a0e837 100644 --- a/iphone/Maps/Images.xcassets/NavigationDashboard/Then Turn/uturn_left_then.imageset/Contents.json +++ b/iphone/Maps/Images.xcassets/NavigationDashboard/Then Turn/uturn_left_then.imageset/Contents.json @@ -19,5 +19,8 @@ "info" : { "version" : 1, "author" : "xcode" + }, + "properties" : { + "template-rendering-intent" : "template" } } \ No newline at end of file