Stabilize beta release with warning cleanup and edge-case fixes
This commit is contained in:
@@ -340,24 +340,9 @@ private struct PlaceResultRow: View {
|
||||
}
|
||||
|
||||
private var formattedAddress: String? {
|
||||
let placemark = item.placemark
|
||||
var components: [String] = []
|
||||
|
||||
if let locality = placemark.locality {
|
||||
components.append(locality)
|
||||
if let cityContext = item.addressRepresentations?.cityWithContext, !cityContext.isEmpty {
|
||||
return cityContext
|
||||
}
|
||||
if let administrativeArea = placemark.administrativeArea {
|
||||
components.append(administrativeArea)
|
||||
}
|
||||
|
||||
return components.isEmpty ? nil : components.joined(separator: ", ")
|
||||
return item.address?.shortAddress ?? item.address?.fullAddress
|
||||
}
|
||||
}
|
||||
|
||||
#Preview {
|
||||
AddItemSheet(
|
||||
tripId: UUID(),
|
||||
day: 1,
|
||||
existingItem: nil
|
||||
) { _ in }
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user