country -> region, region –> province (#298)

This commit is contained in:
callebtc
2025-08-23 15:44:46 +02:00
committed by GitHub
parent a7604d9026
commit 7106be4b07
4 changed files with 15 additions and 14 deletions
@@ -309,14 +309,14 @@ class LocationChannelManager private constructor(private val context: Context) {
// Country
address.countryName?.takeIf { it.isNotEmpty() }?.let {
dict[GeohashChannelLevel.COUNTRY] = it
dict[GeohashChannelLevel.REGION] = it
}
// Region (state/province or county)
// Province (state/province or county)
address.adminArea?.takeIf { it.isNotEmpty() }?.let {
dict[GeohashChannelLevel.REGION] = it
dict[GeohashChannelLevel.PROVINCE] = it
} ?: address.subAdminArea?.takeIf { it.isNotEmpty() }?.let {
dict[GeohashChannelLevel.REGION] = it
dict[GeohashChannelLevel.PROVINCE] = it
}
// City (locality)