re-instate the old fix, duplicte list entry was not the issue it seems

This commit is contained in:
sonora 2015-01-15 00:11:55 +01:00
parent 84ae8ba797
commit 8c07796b18
2 changed files with 5 additions and 7 deletions

View file

@ -173,10 +173,10 @@ public class SearchCityByNameActivity extends SearchByNameAbstractActivity<City>
@Override
public void itemSelected(City obj) {
settings.setLastSearchedCity(obj.getId(), obj.getName(region.useEnglishNames()), obj.getLocation());
// Hardy: Looks like disabling this fixes the issue of the Search City dialogue becoming non-functional after the first tapping on a found village (not city) ... (while selected village is still remembered on the dialog for future reference!)
if (region.getCityById(obj.getId(), obj.getName(region.useEnglishNames())) == null) {
region.addCityToPreloadedList((City) obj);
}
// Hardy: Looks like disabling the next 3 lines fixes the issue of the Search City dialogue becoming non-functional after the first tapping on a found village (not city) ... (while selected village is still remembered on the dialog for future reference!)
//if (region.getCityById(obj.getId(), obj.getName(region.useEnglishNames())) == null) {
// region.addCityToPreloadedList((City) obj);
//}
quitActivity(SearchStreetByNameActivity.class);
}

View file

@ -119,9 +119,7 @@ public class RegionAddressRepositoryBinary implements RegionAddressRepository {
@Override
public synchronized void addCityToPreloadedList(City city) {
if (!cities.containsValue(city)) {
cities.put(city.getId(), city);
}
cities.put(city.getId(), city);
}
@Override