Fix #6126
This commit is contained in:
parent
a8e7fa0f77
commit
c6b6742764
1 changed files with 10 additions and 6 deletions
|
@ -524,9 +524,11 @@ public class SearchUICore {
|
|||
public int getMinimalSearchRadius(SearchPhrase phrase) {
|
||||
int radius = Integer.MAX_VALUE;
|
||||
for (SearchCoreAPI api : apis) {
|
||||
int apiMinimalRadius = api.getMinimalSearchRadius(phrase);
|
||||
if (apiMinimalRadius > 0 && apiMinimalRadius < radius) {
|
||||
radius = apiMinimalRadius;
|
||||
if (api.isSearchAvailable(phrase) && api.getSearchPriority(phrase) != -1) {
|
||||
int apiMinimalRadius = api.getMinimalSearchRadius(phrase);
|
||||
if (apiMinimalRadius > 0 && apiMinimalRadius < radius) {
|
||||
radius = apiMinimalRadius;
|
||||
}
|
||||
}
|
||||
}
|
||||
return radius;
|
||||
|
@ -535,9 +537,11 @@ public class SearchUICore {
|
|||
public int getNextSearchRadius(SearchPhrase phrase) {
|
||||
int radius = Integer.MAX_VALUE;
|
||||
for (SearchCoreAPI api : apis) {
|
||||
int apiNextSearchRadius = api.getNextSearchRadius(phrase);
|
||||
if (apiNextSearchRadius > 0 && apiNextSearchRadius < radius) {
|
||||
radius = apiNextSearchRadius;
|
||||
if (api.isSearchAvailable(phrase) && api.getSearchPriority(phrase) != -1) {
|
||||
int apiNextSearchRadius = api.getNextSearchRadius(phrase);
|
||||
if (apiNextSearchRadius > 0 && apiNextSearchRadius < radius) {
|
||||
radius = apiNextSearchRadius;
|
||||
}
|
||||
}
|
||||
}
|
||||
return radius;
|
||||
|
|
Loading…
Reference in a new issue