Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/mapsme/omim.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
path: root/iphone
diff options
context:
space:
mode:
authorIlya Grechuhin <i.grechuhin@mapswithme.com>2015-09-02 19:00:22 +0300
committerAlex Zolotarev <alex@maps.me>2015-09-23 03:03:30 +0300
commit966497df65d2e64f6c87fcaa343617dcb2ede5ed (patch)
treeb5568a4331a67daac6badcdae9b266534ac9a453 /iphone
parent274b5dad55d00d163c61b45830032eb0bd838a75 (diff)
[ios] Removed pedestrian routing share dialog.
Diffstat (limited to 'iphone')
-rw-r--r--iphone/Maps/Classes/MapViewController.mm33
1 files changed, 0 insertions, 33 deletions
diff --git a/iphone/Maps/Classes/MapViewController.mm b/iphone/Maps/Classes/MapViewController.mm
index d6cbd51391..1ef145dbcb 100644
--- a/iphone/Maps/Classes/MapViewController.mm
+++ b/iphone/Maps/Classes/MapViewController.mm
@@ -31,11 +31,6 @@
extern NSString * const kAlohalyticsTapEventKey = @"$onClick";
-static NSString * const kShowPedestrianToastKey = @"ShowPedestrianToastKey";
-static NSString * const kShownPedestrianAchieveToastKey = @"ShownPedestrianAchieveToastKey";
-static NSString * const kPedestrianRouteCountKey = @"PedestrianRouteCountKey";
-static NSString * const kFirstPedestrianToastDateKey = @"FirstPedestrianToastDateKey";
-
typedef NS_ENUM(NSUInteger, ForceRoutingStateChange)
{
ForceRoutingStateChangeNone,
@@ -543,13 +538,6 @@ typedef NS_OPTIONS(NSUInteger, MapInfoView)
{
[super viewDidAppear:animated];
self.menuRestoreState = self.controlsManager.menuState;
- if (![NSUserDefaults.standardUserDefaults boolForKey:kShowPedestrianToastKey])
- {
- [NSUserDefaults.standardUserDefaults setBool:YES forKey:kShowPedestrianToastKey];
- if (!Alohalytics.isFirstSession)
- [self.alertController presentPedestrianToastAlert:YES];
- [[NSUserDefaults standardUserDefaults] setValue:NSDate.date forKey:kFirstPedestrianToastDateKey];
- }
}
- (void)viewWillDisappear:(BOOL)animated
@@ -681,8 +669,6 @@ typedef NS_OPTIONS(NSUInteger, MapInfoView)
{
case routing::IRouter::ResultCode::NoError:
{
- if (f.GetRouter() == routing::RouterType::Pedestrian)
- [self countPedestrianRoute];
f.GetBalloonManager().RemovePin();
f.GetBalloonManager().Dismiss();
self.controlsManager.routeBuildingProgress = 100.;
@@ -731,25 +717,6 @@ typedef NS_OPTIONS(NSUInteger, MapInfoView)
return self;
}
-- (void)countPedestrianRoute
-{
- if ([NSUserDefaults.standardUserDefaults boolForKey:kShownPedestrianAchieveToastKey])
- return;
- NSInteger pedestrianRoutesCount = [NSUserDefaults.standardUserDefaults integerForKey:kPedestrianRouteCountKey];
- [NSUserDefaults.standardUserDefaults setInteger:++pedestrianRoutesCount forKey:kPedestrianRouteCountKey];
- // We show pedestrian promotion dialog if user has built at least 3 routes and more than 1 day has passed since
- // the first pedestrian navigation promotion.
- if (pedestrianRoutesCount < 3)
- return;
- NSDate * firstToastDate = [NSUserDefaults.standardUserDefaults valueForKey:kFirstPedestrianToastDateKey];
- NSTimeInterval const day = 24 * 60 * 60;
- NSTimeInterval const timePassed = [NSDate.date timeIntervalSinceDate:firstToastDate];
- if (timePassed < day)
- return;
- [NSUserDefaults.standardUserDefaults setBool:YES forKey:kShownPedestrianAchieveToastKey];
- [self.alertController presentPedestrianToastAlert:NO];
-}
-
#pragma mark - API bar
- (MWMAPIBar *)apiBar