fix filter for DataTree's
authorNiki Roo <niki@nikiroo.be>
Sat, 25 Apr 2020 23:42:36 +0000 (01:42 +0200)
committerNiki Roo <niki@nikiroo.be>
Sat, 25 Apr 2020 23:42:36 +0000 (01:42 +0200)
src/be/nikiroo/fanfix_swing/gui/utils/DataTreeAuthors.java
src/be/nikiroo/fanfix_swing/gui/utils/DataTreeTag.java

index 5d57ddb643fd7dc698f1c66e5231ac4faae9db31..a964a8e8d77ce7fe0cf2a2541669415e6600948e 100644 (file)
@@ -17,7 +17,8 @@ public class DataTreeAuthors extends DataTreeSources {
 
        @Override
        protected boolean checkFilter(String filter, DataNodeBook userData) {
-               return userData.toString().toLowerCase().contains(filter.toLowerCase());
+               return userData.getSubnameOrName().toLowerCase()
+                               .contains(filter.toLowerCase());
        }
 
        @Override
index 71c542c475b5e0caf6305f8d07401d63fd4477fc..f94c105d0047a6554e7c5cbae963a16e183c48ce 100644 (file)
@@ -17,7 +17,8 @@ public class DataTreeTag extends DataTreeSources {
 
        @Override
        protected boolean checkFilter(String filter, DataNodeBook userData) {
-               return userData.toString().toLowerCase().contains(filter.toLowerCase());
+               return userData
+                               .getSubnameOrName().toLowerCase().contains(filter.toLowerCase());
        }
 
        @Override