From a3ba5c53b6689d83f8f9a1829398aa118c280fea Mon Sep 17 00:00:00 2001 From: Eugene Nikolsky Date: Wed, 2 Apr 2025 20:16:45 +0300 Subject: [PATCH] [ios] Pass the phone to `didPressCall` This will allow us to know which phone the user has picked when we've added support for multiple phone numbers. Signed-off-by: Eugene Nikolsky --- .../UI/PlacePage/Components/PlacePageInfoViewController.swift | 4 ++-- iphone/Maps/UI/PlacePage/PlacePageInteractor.swift | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/iphone/Maps/UI/PlacePage/Components/PlacePageInfoViewController.swift b/iphone/Maps/UI/PlacePage/Components/PlacePageInfoViewController.swift index 7e255bab4..92cc91c1c 100644 --- a/iphone/Maps/UI/PlacePage/Components/PlacePageInfoViewController.swift +++ b/iphone/Maps/UI/PlacePage/Components/PlacePageInfoViewController.swift @@ -74,7 +74,7 @@ class InfoItemViewController: UIViewController { protocol PlacePageInfoViewControllerDelegate: AnyObject { var shouldShowOpenInApp: Bool { get } - func didPressCall() + func didPressCall(to phone: PlacePagePhone) func didPressWebsite() func didPressWebsiteMenu() func didPressWikipedia() @@ -166,7 +166,7 @@ class PlacePageInfoViewController: UIViewController { icon: UIImage(named: "ic_placepage_phone_number"), style: cellStyle, tapHandler: { [weak self] in - self?.delegate?.didPressCall() + self?.delegate?.didPressCall(to: phone) }, longPressHandler: { [weak self] in self?.delegate?.didCopy(phone.phone) diff --git a/iphone/Maps/UI/PlacePage/PlacePageInteractor.swift b/iphone/Maps/UI/PlacePage/PlacePageInteractor.swift index 0e31df834..be1264c81 100644 --- a/iphone/Maps/UI/PlacePage/PlacePageInteractor.swift +++ b/iphone/Maps/UI/PlacePage/PlacePageInteractor.swift @@ -65,8 +65,8 @@ extension PlacePageInteractor: PlacePageInfoViewControllerDelegate { !OpenInApplication.availableApps.isEmpty } - func didPressCall() { - MWMPlacePageManagerHelper.call(placePageData.infoData?.phone) + func didPressCall(to phone: PlacePagePhone) { + MWMPlacePageManagerHelper.call(phone) } func didPressWebsite() {