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:
Diffstat (limited to 'iphone/Maps/Classes/MapViewController.mm')
-rw-r--r--iphone/Maps/Classes/MapViewController.mm21
1 files changed, 18 insertions, 3 deletions
diff --git a/iphone/Maps/Classes/MapViewController.mm b/iphone/Maps/Classes/MapViewController.mm
index acb07db231..6448ee8cdf 100644
--- a/iphone/Maps/Classes/MapViewController.mm
+++ b/iphone/Maps/Classes/MapViewController.mm
@@ -19,7 +19,9 @@
#import "MWMMapDownloaderViewController.h"
#import "MWMMapViewControlsManager.h"
#import "MWMPageController.h"
+#import "MWMPlacePageData.h"
#import "MWMPlacePageEntity.h"
+#import "MWMPlacePageProtocol.h"
#import "MWMRouter.h"
#import "MWMRouterSavedState.h"
#import "MWMSettings.h"
@@ -70,6 +72,8 @@ NSString * const kDownloaderSegue = @"Map2MapDownloaderSegue";
NSString * const kMigrationSegue = @"Map2MigrationSegue";
NSString * const kEditorSegue = @"Map2EditorSegue";
NSString * const kUDViralAlertWasShown = @"ViralAlertWasShown";
+NSString * const kPP2BookmarkEditingSegue = @"PP2BookmarkEditing";
+
// The first launch after process started. Used to skip "Not follow, no position" state and to run
// locator.
@@ -416,7 +420,8 @@ BOOL gIsFirstMyPositionMode = YES;
- (void)openEditor
{
using namespace osm_auth_ios;
- auto const & featureID = self.controlsManager.placePageEntity.info.GetID();
+
+ auto const & featureID = self.controlsManager.featureHolder.featureId;
[Statistics logEvent:kStatEditorEditStart
withParameters:@{
@@ -425,7 +430,12 @@ BOOL gIsFirstMyPositionMode = YES;
kStatEditorMWMName : @(featureID.GetMwmName().c_str()),
kStatEditorMWMVersion : @(featureID.GetMwmVersion())
}];
- [self performSegueWithIdentifier:kEditorSegue sender:self.controlsManager.placePageEntity];
+ [self performSegueWithIdentifier:kEditorSegue sender:self.controlsManager.featureHolder];
+}
+
+- (void)openBookmarkEditorWithData:(MWMPlacePageData *)data
+{
+ [self performSegueWithIdentifier:kPP2BookmarkEditingSegue sender:data];
}
- (void)processMyPositionStateModeEvent:(location::EMyPositionMode)mode
@@ -552,7 +562,12 @@ BOOL gIsFirstMyPositionMode = YES;
if ([segue.identifier isEqualToString:kEditorSegue])
{
MWMEditorViewController * dvc = segue.destinationViewController;
- [dvc setFeatureToEdit:static_cast<MWMPlacePageEntity *>(sender).featureID];
+ [dvc setFeatureToEdit:static_cast<id<MWMFeatureHolder>>(sender).featureId];
+ }
+ else if ([segue.identifier isEqualToString:kPP2BookmarkEditingSegue])
+ {
+ MWMEditBookmarkController * dvc = segue.destinationViewController;
+ dvc.data = static_cast<MWMPlacePageData *>(sender);
}
else if ([segue.identifier isEqualToString:kDownloaderSegue])
{