forked from organicmaps/organicmaps
[iOS] Fixed the logic for displaying the tutorial
This commit is contained in:
parent
c6c380cfba
commit
3d0c9fc4d9
5 changed files with 15 additions and 3 deletions
|
@ -2,6 +2,7 @@
|
|||
#import "MWMAddPlaceNavigationBar.h"
|
||||
#import "MWMBottomMenuControllerProtocol.h"
|
||||
#import "MWMCommon.h"
|
||||
#import "MWMMapDownloadDialog.h"
|
||||
#import "MWMNetworkPolicy.h"
|
||||
#import "MWMPlacePageManager.h"
|
||||
#import "MWMPlacePageProtocol.h"
|
||||
|
@ -471,14 +472,18 @@ extern NSString * const kAlohalyticsTapEventKey;
|
|||
- (BOOL)showTutorialIfNeeded {
|
||||
if (self.tutorialViewContoller != nil)
|
||||
return YES;
|
||||
|
||||
auto ownerController = self.ownerController;
|
||||
|
||||
if ([self.placePageManager isPPShown] || ownerController.downloadDialog.superview != nil) {
|
||||
return NO;
|
||||
}
|
||||
|
||||
self.tutorialType = [MWMEye getTipType];
|
||||
self.tutorialViewContoller = [self tutorialWithType:self.tutorialType];
|
||||
if (!self.tutorialViewContoller)
|
||||
return NO;
|
||||
|
||||
auto ownerController = self.ownerController;
|
||||
|
||||
[self logTutorialEvent:kStatTipsTricksShow additionalOptions:nil];
|
||||
self.hidden = NO;
|
||||
[ownerController addChildViewController:self.tutorialViewContoller];
|
||||
|
|
|
@ -8,6 +8,7 @@
|
|||
@class MWMAPIBar;
|
||||
@class MWMPlacePageData;
|
||||
@class EAGLView;
|
||||
@class MWMMapDownloadDialog;
|
||||
@protocol MWMLocationModeListener;
|
||||
|
||||
@interface MapViewController : MWMViewController
|
||||
|
@ -51,6 +52,7 @@
|
|||
@property(nonatomic, readonly) MWMMapViewControlsManager * controlsManager;
|
||||
@property(nonatomic) MWMAPIBar * apiBar;
|
||||
@property(nonatomic) MWMWelcomePageController * welcomePageController;
|
||||
@property(nonatomic, readonly) MWMMapDownloadDialog * downloadDialog;
|
||||
|
||||
|
||||
@property(nonatomic) MWMMyPositionMode currentPositionMode;
|
||||
|
|
|
@ -87,7 +87,7 @@ NSString * const kHotelFacilitiesSegue = @"Map2FacilitiesSegue";
|
|||
|
||||
@property(nonatomic) UserTouchesAction userTouchesAction;
|
||||
|
||||
@property(nonatomic) MWMMapDownloadDialog * downloadDialog;
|
||||
@property(nonatomic, readwrite) MWMMapDownloadDialog * downloadDialog;
|
||||
|
||||
@property(nonatomic) BOOL skipForceTouch;
|
||||
|
||||
|
|
|
@ -129,6 +129,10 @@ void RegisterEventIfPossible(eye::MapObject::Event::Type const type, place_page:
|
|||
[self processCountryEvent:[self.data countryId]];
|
||||
}
|
||||
|
||||
- (BOOL)isPPShown {
|
||||
return self.data != nil;
|
||||
}
|
||||
|
||||
- (void)dismiss
|
||||
{
|
||||
[self.layout close];
|
||||
|
|
|
@ -51,6 +51,7 @@ struct HotelFacility;
|
|||
|
||||
- (void)show:(place_page::Info const &)info;
|
||||
- (void)showReview:(place_page::Info const &)info;
|
||||
- (BOOL)isPPShown;
|
||||
- (void)dismiss;
|
||||
- (void)mwm_refreshUI;
|
||||
- (void)didBecomeActive;
|
||||
|
|
Loading…
Add table
Reference in a new issue