diff --git a/iphone/Maps/Classes/CustomViews/MapViewControls/MWMMapViewControlsManager.mm b/iphone/Maps/Classes/CustomViews/MapViewControls/MWMMapViewControlsManager.mm index e4fbb70941..03810c4eac 100644 --- a/iphone/Maps/Classes/CustomViews/MapViewControls/MWMMapViewControlsManager.mm +++ b/iphone/Maps/Classes/CustomViews/MapViewControls/MWMMapViewControlsManager.mm @@ -405,6 +405,9 @@ extern NSString * const kAlohalyticsTapEventKey; - (void)showTutorialIfNeeded { + if ([MWMRouter isRoutingActive] || [MWMRouter hasSavedRoute]) + return; + self.tutorialType = [MWMEye getTipType]; auto tutorial = [self tutorialWithType:self.tutorialType]; if (!tutorial) diff --git a/iphone/Maps/Core/Routing/MWMRouter.h b/iphone/Maps/Core/Routing/MWMRouter.h index 451a070601..793a05e3f8 100644 --- a/iphone/Maps/Core/Routing/MWMRouter.h +++ b/iphone/Maps/Core/Routing/MWMRouter.h @@ -52,6 +52,7 @@ typedef void (^MWMImageHeightBlock)(UIImage *, NSString *); + (void)saveRouteIfNeeded; + (void)restoreRouteIfNeeded; ++ (BOOL)hasSavedRoute; @end diff --git a/iphone/Maps/Core/Routing/MWMRouter.mm b/iphone/Maps/Core/Routing/MWMRouter.mm index 5472867f0e..dd7de7f941 100644 --- a/iphone/Maps/Core/Routing/MWMRouter.mm +++ b/iphone/Maps/Core/Routing/MWMRouter.mm @@ -738,7 +738,7 @@ void logPointEvent(MWMRoutePoint * point, NSString * eventType) if ([MapsAppDelegate theApp].isDrapeEngineCreated) { auto & rm = GetFramework().GetRoutingManager(); - if ([self isRoutingActive] || !rm.HasSavedRoutePoints()) + if ([self isRoutingActive] || ![self hasSavedRoute]) return; rm.LoadRoutePoints([self](bool success) { @@ -754,4 +754,9 @@ void logPointEvent(MWMRoutePoint * point, NSString * eventType) } } ++ (BOOL)hasSavedRoute +{ + return GetFramework().GetRoutingManager().HasSavedRoutePoints(); +} + @end