[iOS] don't show tips'n'tricks when in routing mode

This commit is contained in:
Aleksey Belouosv 2018-10-03 16:36:30 +03:00 committed by Daria Volvenkova
parent 798ff735a5
commit bacde47c42
3 changed files with 10 additions and 1 deletions

View file

@ -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)

View file

@ -52,6 +52,7 @@ typedef void (^MWMImageHeightBlock)(UIImage *, NSString *);
+ (void)saveRouteIfNeeded;
+ (void)restoreRouteIfNeeded;
+ (BOOL)hasSavedRoute;
@end

View file

@ -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