Stabilize beta release with warning cleanup and edge-case fixes
This commit is contained in:
@@ -449,20 +449,13 @@ private struct PlaceRow: View {
|
||||
}
|
||||
|
||||
private var formattedAddress: String? {
|
||||
let placemark = place.placemark
|
||||
var components: [String] = []
|
||||
|
||||
if let thoroughfare = placemark.thoroughfare {
|
||||
components.append(thoroughfare)
|
||||
if let shortAddress = place.address?.shortAddress, !shortAddress.isEmpty {
|
||||
return shortAddress
|
||||
}
|
||||
if let locality = placemark.locality {
|
||||
components.append(locality)
|
||||
if let fullAddress = place.address?.fullAddress, !fullAddress.isEmpty {
|
||||
return fullAddress
|
||||
}
|
||||
if let administrativeArea = placemark.administrativeArea {
|
||||
components.append(administrativeArea)
|
||||
}
|
||||
|
||||
return components.isEmpty ? nil : components.joined(separator: ", ")
|
||||
return place.addressRepresentations?.cityWithContext
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user