diff --git a/iphone/Maps/Bookmarks/BookmarksSection.mm b/iphone/Maps/Bookmarks/BookmarksSection.mm index 90a4fa7504..93cbf12a0a 100644 --- a/iphone/Maps/Bookmarks/BookmarksSection.mm +++ b/iphone/Maps/Bookmarks/BookmarksSection.mm @@ -96,13 +96,12 @@ CGFloat const kPinDiameter = 22.0f; return cell; } -- (void)updateCell:(UITableViewCell *)cell forRow:(NSInteger)row withNewLocation:(location::GpsInfo const &)info { +- (void)updateCell:(UITableViewCell *)cell forRow:(NSInteger)row withNewLocation:(CLLocation *)location { auto const bmId = [self getMarkIdForRow:row]; auto const &bm = GetFramework().GetBookmarkManager(); Bookmark const *bookmark = bm.GetBookmark(bmId); if (!bookmark) return; - CLLocation *location = [[CLLocation alloc] initWithLatitude:info.m_latitude longitude:info.m_longitude]; [self fillCell:cell withBookmarkDetails:bookmark andLocation:location]; } diff --git a/iphone/Maps/Bookmarks/BookmarksVC.mm b/iphone/Maps/Bookmarks/BookmarksVC.mm index 81d7eb2d0c..fa60a8c460 100644 --- a/iphone/Maps/Bookmarks/BookmarksVC.mm +++ b/iphone/Maps/Bookmarks/BookmarksVC.mm @@ -730,11 +730,12 @@ using namespace std; #pragma mark - MWMLocationObserver - (void)onLocationUpdate:(location::GpsInfo const &)info { + CLLocation *location = [[CLLocation alloc] initWithLatitude:info.m_latitude longitude:info.m_longitude]; [self.tableView.visibleCells enumerateObjectsUsingBlock:^(UITableViewCell *cell, NSUInteger idx, BOOL *stop) { auto const indexPath = [self.tableView indexPathForCell:cell]; auto const §ion = [self currentSections][indexPath.section]; if ([section respondsToSelector:@selector(updateCell:forRow:withNewLocation:)]) - [section updateCell:cell forRow:indexPath.row withNewLocation:info]; + [section updateCell:cell forRow:indexPath.row withNewLocation:location]; }]; } diff --git a/iphone/Maps/Bookmarks/TableSectionDataSource.h b/iphone/Maps/Bookmarks/TableSectionDataSource.h index eb284f005c..f04e37b354 100644 --- a/iphone/Maps/Bookmarks/TableSectionDataSource.h +++ b/iphone/Maps/Bookmarks/TableSectionDataSource.h @@ -1,7 +1,7 @@ -#include "platform/location.hpp" - NS_ASSUME_NONNULL_BEGIN +@class CLLocation; + @protocol TableSectionDataSource - (NSInteger)numberOfRows; @@ -15,7 +15,7 @@ NS_ASSUME_NONNULL_BEGIN @optional -- (void)updateCell:(UITableViewCell *)cell forRow:(NSInteger)row withNewLocation:(location::GpsInfo const &)gpsInfo; +- (void)updateCell:(UITableViewCell *)cell forRow:(NSInteger)row withNewLocation:(CLLocation *)location; @end