diff --git a/iphone/Maps/UI/PlacePage/PlacePageInteractor.swift b/iphone/Maps/UI/PlacePage/PlacePageInteractor.swift index acd90b7f5..0e31df834 100644 --- a/iphone/Maps/UI/PlacePage/PlacePageInteractor.swift +++ b/iphone/Maps/UI/PlacePage/PlacePageInteractor.swift @@ -66,7 +66,7 @@ extension PlacePageInteractor: PlacePageInfoViewControllerDelegate { } func didPressCall() { - MWMPlacePageManagerHelper.call(placePageData) + MWMPlacePageManagerHelper.call(placePageData.infoData?.phone) } func didPressWebsite() { @@ -188,7 +188,7 @@ extension PlacePageInteractor: ActionBarViewControllerDelegate { MWMPlacePageManagerHelper.addBookmark(placePageData) } case .call: - MWMPlacePageManagerHelper.call(placePageData) + MWMPlacePageManagerHelper.call(placePageData.infoData?.phone) case .download: guard let mapNodeAttributes = placePageData.mapNodeAttributes else { fatalError("Download button can't be displayed if mapNodeAttributes is empty") diff --git a/iphone/Maps/UI/PlacePage/PlacePageManager/MWMPlacePageManager.mm b/iphone/Maps/UI/PlacePage/PlacePageManager/MWMPlacePageManager.mm index 60e3c508c..1f365be9b 100644 --- a/iphone/Maps/UI/PlacePage/PlacePageManager/MWMPlacePageManager.mm +++ b/iphone/Maps/UI/PlacePage/PlacePageManager/MWMPlacePageManager.mm @@ -194,8 +194,8 @@ using namespace storage; f.GetBookmarkManager().GetEditSession().DeleteTrack(data.trackData.trackId); } -- (void)call:(PlacePageData *)data { - NSURL * _Nullable phoneURL = data.infoData.phone.url; +- (void)call:(PlacePagePhone *)phone { + NSURL * _Nullable phoneURL = phone.url; if (phoneURL && [UIApplication.sharedApplication canOpenURL:phoneURL]) { [UIApplication.sharedApplication openURL:phoneURL options:@{} completionHandler:nil]; } diff --git a/iphone/Maps/UI/PlacePage/PlacePageManager/MWMPlacePageManagerHelper.h b/iphone/Maps/UI/PlacePage/PlacePageManager/MWMPlacePageManagerHelper.h index 1a3579386..b41a1d129 100644 --- a/iphone/Maps/UI/PlacePage/PlacePageManager/MWMPlacePageManagerHelper.h +++ b/iphone/Maps/UI/PlacePage/PlacePageManager/MWMPlacePageManagerHelper.h @@ -1,4 +1,5 @@ @class PlacePageData; +@class PlacePagePhone; @class ElevationProfileData; @interface MWMPlacePageManagerHelper : NSObject @@ -17,7 +18,7 @@ + (void)openTwitter:(PlacePageData *)data; + (void)openVk:(PlacePageData *)data; + (void)openLine:(PlacePageData *)data; -+ (void)call:(PlacePageData *)data; ++ (void)call:(PlacePagePhone *)phone; + (void)showAllFacilities:(PlacePageData *)data; + (void)showPlaceDescription:(NSString *)htmlString; + (void)openMoreUrl:(PlacePageData *)data; diff --git a/iphone/Maps/UI/PlacePage/PlacePageManager/MWMPlacePageManagerHelper.mm b/iphone/Maps/UI/PlacePage/PlacePageManager/MWMPlacePageManagerHelper.mm index c92b871c1..5b5f5aa14 100644 --- a/iphone/Maps/UI/PlacePage/PlacePageManager/MWMPlacePageManagerHelper.mm +++ b/iphone/Maps/UI/PlacePage/PlacePageManager/MWMPlacePageManagerHelper.mm @@ -24,7 +24,7 @@ - (void)openTwitter:(PlacePageData *)data; - (void)openVk:(PlacePageData *)data; - (void)openLine:(PlacePageData *)data; -- (void)call:(PlacePageData *)data; +- (void)call:(PlacePagePhone *)phone; - (void)showAllFacilities:(PlacePageData *)data; - (void)showPlaceDescription:(NSString *)htmlString; - (void)openMoreUrl:(PlacePageData *)data; @@ -109,8 +109,8 @@ [[MWMMapViewControlsManager manager].placePageManager openLine:data]; } -+ (void)call:(PlacePageData *)data { - [[MWMMapViewControlsManager manager].placePageManager call:data]; ++ (void)call:(PlacePagePhone *)phone { + [[MWMMapViewControlsManager manager].placePageManager call:phone]; } + (void)showAllFacilities:(PlacePageData *)data {