mirror of
https://gitlab.com/nkming2/nc-photos.git
synced 2025-03-25 00:14:42 +01:00
Also allow searching admin1 and admin2 regions
This commit is contained in:
parent
5925d3f59b
commit
116884b5d4
1 changed files with 5 additions and 2 deletions
|
@ -214,9 +214,12 @@ class HomeSearchSuggestionBloc
|
||||||
}
|
}
|
||||||
try {
|
try {
|
||||||
final locations = await ListLocationGroup(_c)(account);
|
final locations = await ListLocationGroup(_c)(account);
|
||||||
// replace duplicated entries in name by the one in countryCode
|
// make sure no duplicates
|
||||||
final map = <String, LocationGroup>{};
|
final map = <String, LocationGroup>{};
|
||||||
for (final l in locations.name + locations.countryCode) {
|
for (final l in locations.name +
|
||||||
|
locations.admin1 +
|
||||||
|
locations.admin2 +
|
||||||
|
locations.countryCode) {
|
||||||
map[l.place] = l;
|
map[l.place] = l;
|
||||||
}
|
}
|
||||||
product.addAll(map.values.map((e) => _LocationSearcheable(e)));
|
product.addAll(map.values.map((e) => _LocationSearcheable(e)));
|
||||||
|
|
Loading…
Add table
Reference in a new issue