#549 changed place strategy
This commit is contained in:
parent
9820d32b66
commit
708f1310e4
2 changed files with 6 additions and 1 deletions
|
@ -6,6 +6,7 @@ All notable changes to this project will be documented in this file.
|
||||||
|
|
||||||
### Added
|
### Added
|
||||||
|
|
||||||
|
- Info: improved state/place display (requires rescan, limited to AU/GB/EN)
|
||||||
- improved support for system font scale
|
- improved support for system font scale
|
||||||
|
|
||||||
### Fixed
|
### Fixed
|
||||||
|
|
|
@ -54,12 +54,16 @@ extension ExtraAvesEntryLocation on AvesEntry {
|
||||||
: call());
|
: call());
|
||||||
if (addresses.isNotEmpty) {
|
if (addresses.isNotEmpty) {
|
||||||
final v = addresses.first;
|
final v = addresses.first;
|
||||||
|
var locality = v.locality ?? v.subLocality ?? v.featureName;
|
||||||
|
if (locality == null || locality == v.subThoroughfare) {
|
||||||
|
locality = v.subAdminArea ?? v.addressLine;
|
||||||
|
}
|
||||||
addressDetails = AddressDetails(
|
addressDetails = AddressDetails(
|
||||||
id: id,
|
id: id,
|
||||||
countryCode: v.countryCode?.toUpperCase(),
|
countryCode: v.countryCode?.toUpperCase(),
|
||||||
countryName: v.countryName,
|
countryName: v.countryName,
|
||||||
adminArea: v.adminArea,
|
adminArea: v.adminArea,
|
||||||
locality: v.locality ?? v.subLocality ?? v.featureName ?? v.subAdminArea ?? v.addressLine,
|
locality: locality,
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
} catch (error, stack) {
|
} catch (error, stack) {
|
||||||
|
|
Loading…
Reference in a new issue