Add city part to every street and fix search
This commit is contained in:
parent
072d0d4ef1
commit
d4891ff4e4
1 changed files with 4 additions and 2 deletions
|
@ -78,7 +78,8 @@ public class SearchStreetByNameActivity extends SearchByNameAbstractActivity<Str
|
||||||
if (namesFilter.isCancelled) {
|
if (namesFilter.isCancelled) {
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
if (emptyQuery || CollatorStringMatcher.cmatches(collator, getText(obj), query, StringMatcherMode.CHECK_ONLY_STARTS_WITH)) {
|
if (emptyQuery || CollatorStringMatcher.cmatches(collator, obj.getNameWithoutCityPart(region.useEnglishNames()),
|
||||||
|
query, StringMatcherMode.CHECK_ONLY_STARTS_WITH)) {
|
||||||
Message msg = uiHandler.obtainMessage(MESSAGE_ADD_ENTITY, obj);
|
Message msg = uiHandler.obtainMessage(MESSAGE_ADD_ENTITY, obj);
|
||||||
msg.sendToTarget();
|
msg.sendToTarget();
|
||||||
}
|
}
|
||||||
|
@ -88,7 +89,7 @@ public class SearchStreetByNameActivity extends SearchByNameAbstractActivity<Str
|
||||||
if (namesFilter.isCancelled) {
|
if (namesFilter.isCancelled) {
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
if (CollatorStringMatcher.cmatches(collator, getText(obj), query, StringMatcherMode.CHECK_STARTS_FROM_SPACE_NOT_BEGINNING)) {
|
if (CollatorStringMatcher.cmatches(collator, obj.getNameWithoutCityPart(region.useEnglishNames()), query, StringMatcherMode.CHECK_STARTS_FROM_SPACE_NOT_BEGINNING)) {
|
||||||
Message msg = uiHandler.obtainMessage(MESSAGE_ADD_ENTITY, obj);
|
Message msg = uiHandler.obtainMessage(MESSAGE_ADD_ENTITY, obj);
|
||||||
msg.sendToTarget();
|
msg.sendToTarget();
|
||||||
}
|
}
|
||||||
|
@ -101,6 +102,7 @@ public class SearchStreetByNameActivity extends SearchByNameAbstractActivity<Str
|
||||||
return obj.getName(region.useEnglishNames());
|
return obj.getName(region.useEnglishNames());
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void itemSelected(Street obj) {
|
public void itemSelected(Street obj) {
|
||||||
settings.setLastSearchedStreet(obj.getName(region.useEnglishNames()), obj.getLocation());
|
settings.setLastSearchedStreet(obj.getName(region.useEnglishNames()), obj.getLocation());
|
||||||
|
|
Loading…
Reference in a new issue