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
diff options
context:
space:
mode:
authorIlya Grechuhin <i.grechuhin@gmail.com>2016-11-10 10:08:24 +0300
committerIlya Grechuhin <i.grechuhin@gmail.com>2016-11-10 11:32:16 +0300
commit3d483834f98098318b93d3f0c0d2c43d3cf916c2 (patch)
tree803da3b3d31ba1cf52768f4aa1cc8688c42dc858 /iphone/Maps/Classes
parentd474805ed7f2c98eb22ca77badef2c7bf48eae81 (diff)
[ios] Fixed location alert display logic.
Diffstat (limited to 'iphone/Maps/Classes')
-rw-r--r--iphone/Maps/Classes/CustomAlert/AlertController/MWMAlertViewController.mm7
-rw-r--r--iphone/Maps/Classes/Location/MWMLocationManager.mm3
-rw-r--r--iphone/Maps/Classes/MapViewController.h2
-rw-r--r--iphone/Maps/Classes/MapViewController.mm3
4 files changed, 11 insertions, 4 deletions
diff --git a/iphone/Maps/Classes/CustomAlert/AlertController/MWMAlertViewController.mm b/iphone/Maps/Classes/CustomAlert/AlertController/MWMAlertViewController.mm
index c9638674cb..37bea44e92 100644
--- a/iphone/Maps/Classes/CustomAlert/AlertController/MWMAlertViewController.mm
+++ b/iphone/Maps/Classes/CustomAlert/AlertController/MWMAlertViewController.mm
@@ -3,6 +3,7 @@
#import "MWMController.h"
#import "MWMDownloadTransitMapAlert.h"
#import "MWMLocationAlert.h"
+#import "MapViewController.h"
#import "MapsAppDelegate.h"
static NSString * const kAlertControllerNibIdentifier = @"MWMAlertViewController";
@@ -47,7 +48,11 @@ static NSString * const kAlertControllerNibIdentifier = @"MWMAlertViewController
#pragma mark - Actions
- (void)presentRateAlert { [self displayAlert:MWMAlert.rateAlert]; }
-- (void)presentLocationAlert { [self displayAlert:[MWMAlert locationAlert]]; }
+- (void)presentLocationAlert
+{
+ if (![MapViewController controller].pageViewController)
+ [self displayAlert:[MWMAlert locationAlert]];
+}
- (void)presentPoint2PointAlertWithOkBlock:(nonnull TMWMVoidBlock)okBlock
needToRebuild:(BOOL)needToRebuild
{
diff --git a/iphone/Maps/Classes/Location/MWMLocationManager.mm b/iphone/Maps/Classes/Location/MWMLocationManager.mm
index 1a9badb41c..1664abf3fb 100644
--- a/iphone/Maps/Classes/Location/MWMLocationManager.mm
+++ b/iphone/Maps/Classes/Location/MWMLocationManager.mm
@@ -294,7 +294,6 @@ void setPermissionRequested()
if (self.lastLocationInfo == locationInfo)
return;
self.lastLocationInfo = locationInfo;
- self.lastLocationStatus = location::TLocationError::ENoError;
[self.predictor reset:gpsInfo];
}
@@ -453,6 +452,8 @@ void setPermissionRequested()
// So we filter out such events completely.
if (location.horizontalAccuracy < 0.)
return;
+
+ self.lastLocationStatus = location::TLocationError::ENoError;
[self processLocationUpdate:location];
[[Statistics instance] logLocation:location];
}
diff --git a/iphone/Maps/Classes/MapViewController.h b/iphone/Maps/Classes/MapViewController.h
index aaa01fb826..fb9a5ce144 100644
--- a/iphone/Maps/Classes/MapViewController.h
+++ b/iphone/Maps/Classes/MapViewController.h
@@ -1,4 +1,5 @@
#import "MWMMapDownloaderTypes.h"
+#import "MWMPageController.h"
#import "MWMViewController.h"
#include "geometry/point2d.hpp"
@@ -38,5 +39,6 @@ struct AddressInfo;
@property(nonatomic, readonly) MWMMapViewControlsManager * controlsManager;
@property(nonatomic) MWMAPIBar * apiBar;
+@property(nonatomic) MWMPageController * pageViewController;
@end
diff --git a/iphone/Maps/Classes/MapViewController.mm b/iphone/Maps/Classes/MapViewController.mm
index ef91871ee1..69ed7669f0 100644
--- a/iphone/Maps/Classes/MapViewController.mm
+++ b/iphone/Maps/Classes/MapViewController.mm
@@ -18,7 +18,6 @@
#import "MWMMapDownloadDialog.h"
#import "MWMMapDownloaderViewController.h"
#import "MWMMapViewControlsManager.h"
-#import "MWMPageController.h"
#import "MWMPlacePageData.h"
#import "MWMPlacePageEntity.h"
#import "MWMPlacePageProtocol.h"
@@ -110,7 +109,7 @@ BOOL gIsFirstMyPositionMode = YES;
@property(nonatomic) BOOL disableStandbyOnLocationStateMode;
@property(nonatomic) UserTouchesAction userTouchesAction;
-@property(nonatomic) MWMPageController * pageViewController;
+
@property(nonatomic) MWMMapDownloadDialog * downloadDialog;
@property(nonatomic) BOOL skipForceTouch;