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:
authorVladiMihaylenko <vxmihaylenko@gmail.com>2019-05-15 17:57:21 +0300
committerVladimir Byko-Ianko <bykoianko@gmail.com>2019-05-17 16:45:03 +0300
commit9171567414303416e3d2801711b8fd1e4e268565 (patch)
tree96550a8b510499dce5a8a39e8bd8c7f1b2d6f555 /iphone
parent448e9fb4c6ab5beb7125db29a7ec5b9bfcc73503 (diff)
[routing] Fixed duplicate names in absent list.
Diffstat (limited to 'iphone')
-rw-r--r--iphone/Maps/Classes/CustomAlert/AlertController/MWMAlertViewController+CPP.h3
-rw-r--r--iphone/Maps/Classes/CustomAlert/AlertController/MWMAlertViewController.mm2
-rw-r--r--iphone/Maps/Classes/CustomAlert/BaseAlert/MWMAlert+CPP.h3
-rw-r--r--iphone/Maps/Classes/CustomAlert/BaseAlert/MWMAlert.mm2
-rw-r--r--iphone/Maps/Classes/CustomAlert/DownloadTransitMapsAlert/MWMDownloadTransitMapAlert.h4
-rw-r--r--iphone/Maps/Classes/CustomAlert/DownloadTransitMapsAlert/MWMDownloadTransitMapAlert.mm6
-rw-r--r--iphone/Maps/Core/Framework/MWMFrameworkHelper.mm3
-rw-r--r--iphone/Maps/Core/Framework/MWMFrameworkListener.mm5
-rw-r--r--iphone/Maps/Core/Framework/MWMFrameworkObservers.h2
-rw-r--r--iphone/Maps/Core/Routing/MWMRouter.mm4
10 files changed, 21 insertions, 13 deletions
diff --git a/iphone/Maps/Classes/CustomAlert/AlertController/MWMAlertViewController+CPP.h b/iphone/Maps/Classes/CustomAlert/AlertController/MWMAlertViewController+CPP.h
index d1a019932b..6e7f3e56de 100644
--- a/iphone/Maps/Classes/CustomAlert/AlertController/MWMAlertViewController+CPP.h
+++ b/iphone/Maps/Classes/CustomAlert/AlertController/MWMAlertViewController+CPP.h
@@ -4,11 +4,12 @@
#include "routing/router.hpp"
#include "routing/routing_callbacks.hpp"
#include "storage/storage.hpp"
+#include "storage/storage_defines.hpp"
@interface MWMAlertViewController (CPP)
- (void)presentAlert:(routing::RouterResultCode)type;
-- (void)presentDownloaderAlertWithCountries:(storage::CountriesVec const &)countries
+- (void)presentDownloaderAlertWithCountries:(storage::CountriesSet const &)countries
code:(routing::RouterResultCode)code
cancelBlock:(nonnull MWMVoidBlock)cancelBlock
downloadBlock:(nonnull MWMDownloadBlock)downloadBlock
diff --git a/iphone/Maps/Classes/CustomAlert/AlertController/MWMAlertViewController.mm b/iphone/Maps/Classes/CustomAlert/AlertController/MWMAlertViewController.mm
index 517b11406a..9dc2dac3a4 100644
--- a/iphone/Maps/Classes/CustomAlert/AlertController/MWMAlertViewController.mm
+++ b/iphone/Maps/Classes/CustomAlert/AlertController/MWMAlertViewController.mm
@@ -102,7 +102,7 @@ static NSString * const kAlertControllerNibIdentifier = @"MWMAlertViewController
[self displayAlert:[MWMAlert routingMigrationAlertWithOkBlock:okBlock]];
}
-- (void)presentDownloaderAlertWithCountries:(storage::CountriesVec const &)countries
+- (void)presentDownloaderAlertWithCountries:(storage::CountriesSet const &)countries
code:(routing::RouterResultCode)code
cancelBlock:(MWMVoidBlock)cancelBlock
downloadBlock:(MWMDownloadBlock)downloadBlock
diff --git a/iphone/Maps/Classes/CustomAlert/BaseAlert/MWMAlert+CPP.h b/iphone/Maps/Classes/CustomAlert/BaseAlert/MWMAlert+CPP.h
index bfa40ecafa..f10b18997f 100644
--- a/iphone/Maps/Classes/CustomAlert/BaseAlert/MWMAlert+CPP.h
+++ b/iphone/Maps/Classes/CustomAlert/BaseAlert/MWMAlert+CPP.h
@@ -3,13 +3,14 @@
#include "routing/router.hpp"
#include "routing/routing_callbacks.hpp"
#include "storage/storage.hpp"
+#include "storage/storage_defines.hpp"
using MWMDownloadBlock = void (^)(storage::CountriesVec const &, MWMVoidBlock);
@interface MWMAlert (CPP)
+ (MWMAlert *)alert:(routing::RouterResultCode)type;
-+ (MWMAlert *)downloaderAlertWithAbsentCountries:(storage::CountriesVec const &)countries
++ (MWMAlert *)downloaderAlertWithAbsentCountries:(storage::CountriesSet const &)countries
code:(routing::RouterResultCode)code
cancelBlock:(MWMVoidBlock)cancelBlock
downloadBlock:(MWMDownloadBlock)downloadBlock
diff --git a/iphone/Maps/Classes/CustomAlert/BaseAlert/MWMAlert.mm b/iphone/Maps/Classes/CustomAlert/BaseAlert/MWMAlert.mm
index 2cc2faf131..a0d15e7777 100644
--- a/iphone/Maps/Classes/CustomAlert/BaseAlert/MWMAlert.mm
+++ b/iphone/Maps/Classes/CustomAlert/BaseAlert/MWMAlert.mm
@@ -50,7 +50,7 @@
return [MWMDefaultAlert routingMigrationAlertWithOkBlock:okBlock];
}
-+ (MWMAlert *)downloaderAlertWithAbsentCountries:(storage::CountriesVec const &)countries
++ (MWMAlert *)downloaderAlertWithAbsentCountries:(storage::CountriesSet const &)countries
code:(routing::RouterResultCode)code
cancelBlock:(MWMVoidBlock)cancelBlock
downloadBlock:(MWMDownloadBlock)downloadBlock
diff --git a/iphone/Maps/Classes/CustomAlert/DownloadTransitMapsAlert/MWMDownloadTransitMapAlert.h b/iphone/Maps/Classes/CustomAlert/DownloadTransitMapsAlert/MWMDownloadTransitMapAlert.h
index 13f8b4b10e..013e0a94e6 100644
--- a/iphone/Maps/Classes/CustomAlert/DownloadTransitMapsAlert/MWMDownloadTransitMapAlert.h
+++ b/iphone/Maps/Classes/CustomAlert/DownloadTransitMapsAlert/MWMDownloadTransitMapAlert.h
@@ -2,9 +2,11 @@
#include "routing/routing_callbacks.hpp"
+#include "storage/storage_defines.hpp"
+
@interface MWMDownloadTransitMapAlert : MWMAlert
-+ (instancetype)downloaderAlertWithMaps:(storage::CountriesVec const &)countries
++ (instancetype)downloaderAlertWithMaps:(storage::CountriesSet const &)countries
code:(routing::RouterResultCode)code
cancelBlock:(MWMVoidBlock)cancelBlock
downloadBlock:(MWMDownloadBlock)downloadBlock
diff --git a/iphone/Maps/Classes/CustomAlert/DownloadTransitMapsAlert/MWMDownloadTransitMapAlert.mm b/iphone/Maps/Classes/CustomAlert/DownloadTransitMapsAlert/MWMDownloadTransitMapAlert.mm
index e4a74994d9..2431e5df20 100644
--- a/iphone/Maps/Classes/CustomAlert/DownloadTransitMapsAlert/MWMDownloadTransitMapAlert.mm
+++ b/iphone/Maps/Classes/CustomAlert/DownloadTransitMapsAlert/MWMDownloadTransitMapAlert.mm
@@ -56,7 +56,7 @@ CGFloat const kAnimationDuration = .05;
storage::CountriesVec m_countries;
}
-+ (instancetype)downloaderAlertWithMaps:(storage::CountriesVec const &)countries
++ (instancetype)downloaderAlertWithMaps:(storage::CountriesSet const &)countries
code:(routing::RouterResultCode)code
cancelBlock:(MWMVoidBlock)cancelBlock
downloadBlock:(MWMDownloadBlock)downloadBlock
@@ -90,14 +90,14 @@ CGFloat const kAnimationDuration = .05;
return alert;
}
-+ (instancetype)alertWithCountries:(storage::CountriesVec const &)countries
++ (instancetype)alertWithCountries:(storage::CountriesSet const &)countries
{
NSAssert(!countries.empty(), @"countries can not be empty.");
MWMDownloadTransitMapAlert * alert =
[NSBundle.mainBundle loadNibNamed:kDownloadTransitMapAlertNibName owner:nil options:nil]
.firstObject;
- alert->m_countries = countries;
+ alert->m_countries = storage::CountriesVec(countries.begin(), countries.end());
[alert configure];
[alert updateCountriesList];
[MWMFrameworkListener addObserver:alert];
diff --git a/iphone/Maps/Core/Framework/MWMFrameworkHelper.mm b/iphone/Maps/Core/Framework/MWMFrameworkHelper.mm
index e81afb75c2..22a866323d 100644
--- a/iphone/Maps/Core/Framework/MWMFrameworkHelper.mm
+++ b/iphone/Maps/Core/Framework/MWMFrameworkHelper.mm
@@ -5,9 +5,10 @@
#include "Framework.h"
-#include "base/sunrise_sunset.hpp"
#include "platform/network_policy_ios.h"
+#include "base/sunrise_sunset.hpp"
+
@implementation MWMFrameworkHelper
+ (void)processFirstLaunch
diff --git a/iphone/Maps/Core/Framework/MWMFrameworkListener.mm b/iphone/Maps/Core/Framework/MWMFrameworkListener.mm
index fa3ce71fca..a6847b37bc 100644
--- a/iphone/Maps/Core/Framework/MWMFrameworkListener.mm
+++ b/iphone/Maps/Core/Framework/MWMFrameworkListener.mm
@@ -2,6 +2,9 @@
#include "Framework.h"
+#include "storage/storage.hpp"
+#include "storage/storage_defines.hpp"
+
namespace
{
using Observer = id<MWMFrameworkObserver>;
@@ -97,7 +100,7 @@ void loopWrappers(Observers * observers, TLoopBlock block)
Observers * observers = self.routeBuildingObservers;
auto & rm = GetFramework().GetRoutingManager();
rm.SetRouteBuildingListener(
- [observers](RouterResultCode code, CountriesVec const & absentCountries) {
+ [observers](RouterResultCode code, CountriesSet const & absentCountries) {
loopWrappers(observers, [code, absentCountries](TRouteBuildingObserver observer) {
[observer processRouteBuilderEvent:code countries:absentCountries];
});
diff --git a/iphone/Maps/Core/Framework/MWMFrameworkObservers.h b/iphone/Maps/Core/Framework/MWMFrameworkObservers.h
index 5a899b1696..87abf9d2a0 100644
--- a/iphone/Maps/Core/Framework/MWMFrameworkObservers.h
+++ b/iphone/Maps/Core/Framework/MWMFrameworkObservers.h
@@ -14,7 +14,7 @@ using namespace storage;
@protocol MWMFrameworkRouteBuilderObserver<MWMFrameworkObserver>
- (void)processRouteBuilderEvent:(routing::RouterResultCode)code
- countries:(storage::CountriesVec const &)absentCountries;
+ countries:(storage::CountriesSet const &)absentCountries;
@optional
diff --git a/iphone/Maps/Core/Routing/MWMRouter.mm b/iphone/Maps/Core/Routing/MWMRouter.mm
index 7643b32a3a..e817d2523e 100644
--- a/iphone/Maps/Core/Routing/MWMRouter.mm
+++ b/iphone/Maps/Core/Routing/MWMRouter.mm
@@ -641,7 +641,7 @@ void logPointEvent(MWMRoutePoint * point, NSString * eventType)
}
- (void)processRouteBuilderEvent:(routing::RouterResultCode)code
- countries:(storage::CountriesVec const &)absentCountries
+ countries:(storage::CountriesSet const &)absentCountries
{
MWMMapViewControlsManager * mapViewControlsManager = [MWMMapViewControlsManager manager];
switch (code)
@@ -704,7 +704,7 @@ void logPointEvent(MWMRoutePoint * point, NSString * eventType)
#pragma mark - Alerts
- (void)presentDownloaderAlert:(routing::RouterResultCode)code
- countries:(storage::CountriesVec const &)countries
+ countries:(storage::CountriesSet const &)countries
{
MWMAlertViewController * activeAlertController = [MWMAlertViewController activeAlertController];
if (platform::migrate::NeedMigrate())