Fix compilation
This commit is contained in:
parent
a2c04cd48a
commit
ac7e1d4436
3 changed files with 15 additions and 16 deletions
|
@ -713,7 +713,6 @@ public class SearchUICore {
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public boolean publish(SearchResult object) {
|
public boolean publish(SearchResult object) {
|
||||||
// TODO Check names and count first , other?
|
|
||||||
if (phrase != null && object.otherNames != null && !phrase.getFirstUnknownNameStringMatcher().matches(object.localeName)) {
|
if (phrase != null && object.otherNames != null && !phrase.getFirstUnknownNameStringMatcher().matches(object.localeName)) {
|
||||||
for (String s : object.otherNames) {
|
for (String s : object.otherNames) {
|
||||||
if (phrase.getFirstUnknownNameStringMatcher().matches(s)) {
|
if (phrase.getFirstUnknownNameStringMatcher().matches(s)) {
|
||||||
|
@ -721,7 +720,6 @@ public class SearchUICore {
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
// TODO
|
|
||||||
if (Algorithms.isEmpty(object.alternateName) && object.object instanceof Amenity) {
|
if (Algorithms.isEmpty(object.alternateName) && object.object instanceof Amenity) {
|
||||||
for (String value : ((Amenity) object.object).getAdditionalInfo().values()) {
|
for (String value : ((Amenity) object.object).getAdditionalInfo().values()) {
|
||||||
if (phrase.getFirstUnknownNameStringMatcher().matches(value)) {
|
if (phrase.getFirstUnknownNameStringMatcher().matches(value)) {
|
||||||
|
|
|
@ -359,13 +359,14 @@ public class QuickSearchDialogFragment extends DialogFragment implements OsmAndC
|
||||||
filter = app.getPoiFilters().getNominatimPOIFilter();
|
filter = app.getPoiFilters().getNominatimPOIFilter();
|
||||||
filter.setFilterByName(searchPhrase.getUnknownSearchPhrase());
|
filter.setFilterByName(searchPhrase.getUnknownSearchPhrase());
|
||||||
filter.clearCurrentResults();
|
filter.clearCurrentResults();
|
||||||
} else if (searchPhrase.hasUnknownSearchWordPoiType()) {
|
// TODO Alexey
|
||||||
AbstractPoiType pt = searchPhrase.getUnknownSearchWordPoiType();
|
// } else if (searchPhrase.hasUnknownSearchWordPoiType()) {
|
||||||
filter = new PoiUIFilter(pt, app, "");
|
// AbstractPoiType pt = searchPhrase.getUnknownSearchWordPoiType();
|
||||||
String customName = searchPhrase.getPoiNameFilter();
|
// filter = new PoiUIFilter(pt, app, "");
|
||||||
if (!Algorithms.isEmpty(customName)) {
|
// String customName = searchPhrase.getPoiNameFilter();
|
||||||
filter.setFilterByName(customName);
|
// if (!Algorithms.isEmpty(customName)) {
|
||||||
}
|
// filter.setFilterByName(customName);
|
||||||
|
// }
|
||||||
} else {
|
} else {
|
||||||
filter = app.getPoiFilters().getSearchByNamePOIFilter();
|
filter = app.getPoiFilters().getSearchByNamePOIFilter();
|
||||||
if (!Algorithms.isEmpty(searchPhrase.getFirstUnknownSearchWord())) {
|
if (!Algorithms.isEmpty(searchPhrase.getFirstUnknownSearchWord())) {
|
||||||
|
|
|
@ -201,9 +201,9 @@ public class QuickSearchHelper implements ResourceListener {
|
||||||
//sr.localeRelatedObjectName = app.getRegions().getCountryName(sr.location);
|
//sr.localeRelatedObjectName = app.getRegions().getCountryName(sr.location);
|
||||||
sr.relatedObject = selectedGpx.getGpxFile();
|
sr.relatedObject = selectedGpx.getGpxFile();
|
||||||
sr.preferredZoom = 17;
|
sr.preferredZoom = 17;
|
||||||
if (phrase.getUnknownSearchWordLength() <= 1 && phrase.isNoSelectedType()) {
|
if (phrase.getFirstUnknownSearchWord().length() <= 1 && phrase.isNoSelectedType()) {
|
||||||
resultMatcher.publish(sr);
|
resultMatcher.publish(sr);
|
||||||
} else if (phrase.getNameStringMatcher().matches(sr.localeName)) {
|
} else if (phrase.getFirstUnknownNameStringMatcher().matches(sr.localeName)) {
|
||||||
resultMatcher.publish(sr);
|
resultMatcher.publish(sr);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -249,7 +249,7 @@ public class QuickSearchHelper implements ResourceListener {
|
||||||
sr.priority = SEARCH_FAVORITE_CATEGORY_PRIORITY;
|
sr.priority = SEARCH_FAVORITE_CATEGORY_PRIORITY;
|
||||||
sr.objectType = ObjectType.FAVORITE_GROUP;
|
sr.objectType = ObjectType.FAVORITE_GROUP;
|
||||||
sr.preferredZoom = 17;
|
sr.preferredZoom = 17;
|
||||||
if (phrase.getNameStringMatcher().matches(sr.localeName)) {
|
if (phrase.getFirstUnknownNameStringMatcher().matches(sr.localeName)) {
|
||||||
if (group.getPoints().size() < 5) {
|
if (group.getPoints().size() < 5) {
|
||||||
for (FavouritePoint point : group.getPoints()) {
|
for (FavouritePoint point : group.getPoints()) {
|
||||||
SearchResult srp = new SearchResult(phrase);
|
SearchResult srp = new SearchResult(phrase);
|
||||||
|
@ -313,10 +313,10 @@ public class QuickSearchHelper implements ResourceListener {
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
if (phrase.getUnknownSearchWordLength() <= 1
|
if (phrase.getFirstUnknownSearchWord().length() <= 1
|
||||||
&& (phrase.isNoSelectedType() || phrase.isLastWord(ObjectType.FAVORITE_GROUP))) {
|
&& (phrase.isNoSelectedType() || phrase.isLastWord(ObjectType.FAVORITE_GROUP))) {
|
||||||
resultMatcher.publish(sr);
|
resultMatcher.publish(sr);
|
||||||
} else if (phrase.getNameStringMatcher().matches(sr.localeName)) {
|
} else if (phrase.getFirstUnknownNameStringMatcher().matches(sr.localeName)) {
|
||||||
resultMatcher.publish(sr);
|
resultMatcher.publish(sr);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -457,9 +457,9 @@ public class QuickSearchHelper implements ResourceListener {
|
||||||
}
|
}
|
||||||
if (publish) {
|
if (publish) {
|
||||||
sr.priority = SEARCH_HISTORY_OBJECT_PRIORITY + (p++);
|
sr.priority = SEARCH_HISTORY_OBJECT_PRIORITY + (p++);
|
||||||
if (phrase.getUnknownSearchWordLength() <= 1 && phrase.isNoSelectedType()) {
|
if (phrase.getFirstUnknownSearchWord().length() <= 1 && phrase.isNoSelectedType()) {
|
||||||
resultMatcher.publish(sr);
|
resultMatcher.publish(sr);
|
||||||
} else if (phrase.getNameStringMatcher().matches(sr.localeName)) {
|
} else if (phrase.getFirstUnknownNameStringMatcher().matches(sr.localeName)) {
|
||||||
resultMatcher.publish(sr);
|
resultMatcher.publish(sr);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue