SPARK-1300, removing notes and tasks buttons -> place them in "Actions" menu

dont start looking for provided strings in whole name unless more than 3 letters entered
on a huge roster it takes forever to check 500contacts if they contain "o"

git-svn-id: http://svn.igniterealtime.org/svn/repos/spark/trunk@12296 b35dd754-fafc-0310-a699-88a17e54d16e
This commit is contained in:
Wolf Posdorfer
2011-04-28 16:09:05 +00:00
committed by wolf.posdorfer
parent d3021a0bcd
commit ddb07c7dff
2 changed files with 17 additions and 13 deletions

View File

@ -158,12 +158,12 @@ public class JContactItemField extends JPanel {
String typedItem = textField.getText();
final List<ContactItem> validItems = new ArrayList<ContactItem>();
final List<ContactItem> validItems = new ArrayList<ContactItem>();
for (ContactItem contactItem : items) {
String nickname = contactItem.getDisplayName().toLowerCase();
if (nickname.startsWith(typedItem.toLowerCase())) {
validItems.add(contactItem);
} else if (nickname.contains(typedItem.toLowerCase())) {
} else if (typedItem.length() > 2 && nickname.contains(typedItem.toLowerCase())) {
validItems.add(contactItem);
}
}