mirror of
https://codeberg.org/comaps/comaps
synced 2025-12-20 05:13:58 +00:00
[ios] Extract PlacePagePhone class
It groups two phone-related properties, `phone` and `phoneUrl` (renamed to `url`), that used to be in `PlacePageInfoData`. This will make it easier to support an array of phones for one POI. Signed-off-by: Eugene Nikolsky <omaps@egeek.me>
This commit is contained in:
committed by
Konstantin Pastbin
parent
f1db7d7f98
commit
9be9f17df9
@@ -159,17 +159,17 @@ class PlacePageInfoViewController: UIViewController {
|
||||
|
||||
if let phone = placePageInfoData.phone {
|
||||
var cellStyle: Style = .regular
|
||||
if let phoneUrl = placePageInfoData.phoneUrl, UIApplication.shared.canOpenURL(phoneUrl) {
|
||||
if let phoneUrl = phone.url, UIApplication.shared.canOpenURL(phoneUrl) {
|
||||
cellStyle = .link
|
||||
}
|
||||
phoneView = createInfoItem(phone,
|
||||
phoneView = createInfoItem(phone.phone,
|
||||
icon: UIImage(named: "ic_placepage_phone_number"),
|
||||
style: cellStyle,
|
||||
tapHandler: { [weak self] in
|
||||
self?.delegate?.didPressCall()
|
||||
},
|
||||
longPressHandler: { [weak self] in
|
||||
self?.delegate?.didCopy(phone)
|
||||
self?.delegate?.didCopy(phone.phone)
|
||||
})
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user