mirror of
https://gitlab.com/nkming2/nc-photos.git
synced 2025-01-22 16:56:19 +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 {
|
||||
final locations = await ListLocationGroup(_c)(account);
|
||||
// replace duplicated entries in name by the one in countryCode
|
||||
// make sure no duplicates
|
||||
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;
|
||||
}
|
||||
product.addAll(map.values.map((e) => _LocationSearcheable(e)));
|
||||
|
|
Loading…
Reference in a new issue