forked from organicmaps/organicmaps
[iOS] don't show tips'n'tricks when in routing mode
This commit is contained in:
parent
798ff735a5
commit
bacde47c42
3 changed files with 10 additions and 1 deletions
|
@ -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)
|
||||
|
|
|
@ -52,6 +52,7 @@ typedef void (^MWMImageHeightBlock)(UIImage *, NSString *);
|
|||
|
||||
+ (void)saveRouteIfNeeded;
|
||||
+ (void)restoreRouteIfNeeded;
|
||||
+ (BOOL)hasSavedRoute;
|
||||
|
||||
@end
|
||||
|
||||
|
|
|
@ -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
|
||||
|
|
Loading…
Add table
Reference in a new issue