forked from j62/ctbrec
Fix: Filter was negated by refactoring
This commit is contained in:
parent
85bacb8c04
commit
4dd99a6dd3
|
@ -763,7 +763,7 @@ public class ThumbOverviewTab extends Tab implements TabSelectionListener {
|
||||||
String[] tokens = filter.split(" ");
|
String[] tokens = filter.split(" ");
|
||||||
boolean tokensMissing = false;
|
boolean tokensMissing = false;
|
||||||
for (String token : tokens) {
|
for (String token : tokens) {
|
||||||
if(!modelPropertiesMatchToken(token, m)) {
|
if (!modelPropertiesMatchToken(token, m)) {
|
||||||
tokensMissing = true;
|
tokensMissing = true;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -778,24 +778,24 @@ public class ThumbOverviewTab extends Tab implements TabSelectionListener {
|
||||||
int[] resolution = m.getStreamResolution(true);
|
int[] resolution = m.getStreamResolution(true);
|
||||||
String searchText = createSearchText(m);
|
String searchText = createSearchText(m);
|
||||||
boolean tokensMissing = false;
|
boolean tokensMissing = false;
|
||||||
if(token.matches(">\\d+")) {
|
if (token.matches(">\\d+")) {
|
||||||
int res = Integer.parseInt(token.substring(1));
|
int res = Integer.parseInt(token.substring(1));
|
||||||
if(resolution[1] < res) {
|
if (resolution[1] < res) {
|
||||||
tokensMissing = true;
|
tokensMissing = true;
|
||||||
}
|
}
|
||||||
} else if(token.matches("<\\d+")) {
|
} else if (token.matches("<\\d+")) {
|
||||||
int res = Integer.parseInt(token.substring(1));
|
int res = Integer.parseInt(token.substring(1));
|
||||||
if(resolution[1] > res) {
|
if (resolution[1] > res) {
|
||||||
tokensMissing = true;
|
tokensMissing = true;
|
||||||
}
|
}
|
||||||
} else if(token.equals("public")) {
|
} else if (token.equals("public")) {
|
||||||
if(!m.getOnlineState(true).toString().equals(token)) {
|
if (m.getOnlineState(true) != ctbrec.Model.State.ONLINE) {
|
||||||
tokensMissing = true;
|
tokensMissing = true;
|
||||||
}
|
}
|
||||||
} else if(!searchText.toLowerCase().contains(token.toLowerCase())) {
|
} else if (!searchText.toLowerCase().contains(token.toLowerCase())) {
|
||||||
tokensMissing = true;
|
tokensMissing = true;
|
||||||
}
|
}
|
||||||
return tokensMissing;
|
return !tokensMissing;
|
||||||
}
|
}
|
||||||
|
|
||||||
private String createSearchText(Model m) throws ExecutionException {
|
private String createSearchText(Model m) throws ExecutionException {
|
||||||
|
|
Loading…
Reference in New Issue