Various fixes

This commit is contained in:
Ilya Laktyushin
2023-08-13 03:50:44 +02:00
parent 6d255e16a3
commit 5884fdff66
3 changed files with 46 additions and 8 deletions

View File

@@ -798,8 +798,12 @@ final class LocationPickerControllerNode: ViewControllerTracingNode, CLLocationM
var cityName: String?
var streetName: String?
let countryCode = placemark?.countryCode
if let city = placemark?.city, let countryCode = placemark?.countryCode {
cityName = "\(city), \(displayCountryName(countryCode, locale: locale))"
if let city = placemark?.city {
if let countryCode = placemark?.countryCode {
cityName = "\(city), \(displayCountryName(countryCode, locale: locale))"
} else {
cityName = city
}
} else {
cityName = ""
}
@@ -843,8 +847,12 @@ final class LocationPickerControllerNode: ViewControllerTracingNode, CLLocationM
var cityName: String?
var streetName: String?
let countryCode = placemark?.countryCode
if let city = placemark?.city, let countryCode = placemark?.countryCode {
cityName = "\(city), \(displayCountryName(countryCode, locale: locale))"
if let city = placemark?.city {
if let countryCode = placemark?.countryCode {
cityName = "\(city), \(displayCountryName(countryCode, locale: locale))"
} else {
cityName = city
}
} else {
cityName = ""
}