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:
authorvng <viktor.govako@gmail.com>2015-05-15 13:27:33 +0300
committerAlex Zolotarev <alex@maps.me>2015-09-23 02:48:12 +0300
commit06751fb0308f44f5eb96e94327f46b8753b7c238 (patch)
treedaaebc5c5df325d9025101d5fbfa076ec0bac41c /iphone/Maps/Classes/MapsObservers.mm
parent5e4b0bbd6e7e44f5e5e26709f34a02cbf6718c11 (diff)
[iOS] Added Apple Watch functionality.
Diffstat (limited to 'iphone/Maps/Classes/MapsObservers.mm')
-rw-r--r--iphone/Maps/Classes/MapsObservers.mm10
1 files changed, 10 insertions, 0 deletions
diff --git a/iphone/Maps/Classes/MapsObservers.mm b/iphone/Maps/Classes/MapsObservers.mm
index 4850f88b79..5994e870c6 100644
--- a/iphone/Maps/Classes/MapsObservers.mm
+++ b/iphone/Maps/Classes/MapsObservers.mm
@@ -1,12 +1,21 @@
#import <Foundation/Foundation.h>
#import "MapsObservers.h"
+#import "MWMWatchNotification.h"
+#import "Common.h"
ActiveMapsObserver::ActiveMapsObserver(id<ActiveMapsObserverProtocol> delegateObject)
: m_delegateObject(delegateObject)
+, m_notificationCenter([[MWMWatchNotification alloc] init])
{
}
+ActiveMapsObserver::~ActiveMapsObserver()
+{
+ m_notificationCenter = nil;
+ m_delegateObject = nil;
+}
+
void ActiveMapsObserver::CountryGroupChanged(ActiveMapsLayout::TGroup const & oldGroup, int oldPosition,
ActiveMapsLayout::TGroup const & newGroup, int newPosition)
{
@@ -29,6 +38,7 @@ void ActiveMapsObserver::CountryOptionsChanged(ActiveMapsLayout::TGroup const &
void ActiveMapsObserver::DownloadingProgressUpdate(ActiveMapsLayout::TGroup const & group, int position, LocalAndRemoteSizeT const & progress)
{
+ [m_notificationCenter passMessageObject:@((double)progress.first / progress.second) identifier:kDownloadingProgressUpdateNotificationId];
if ([m_delegateObject respondsToSelector:@selector(countryDownloadingProgressChanged:atPosition:inGroup:)])
[m_delegateObject countryDownloadingProgressChanged:progress atPosition:position inGroup:group];
}