also search in list option values when searching in options menu

This commit is contained in:
yugecin 2018-10-02 23:54:55 +02:00
parent 5b324bf6ba
commit 2b954f6c7c
No known key found for this signature in database
GPG Key ID: 2C5AC035A7068E44

View File

@ -75,6 +75,14 @@ public class Option {
return false;
}
filtered = !name.toLowerCase().contains(searchString) && !description.toLowerCase().contains(searchString);
if (this instanceof ListOption) {
for (Object itm : ((ListOption) this).getListItems()) {
if (itm != null && itm.toString().toLowerCase().contains(searchString)) {
filtered = false;
return false;
}
}
}
return filtered;
}