mirror of
https://github.com/igniterealtime/Spark.git
synced 2025-12-01 12:27:58 +00:00
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:
committed by
wolf.posdorfer
parent
d3021a0bcd
commit
ddb07c7dff
@ -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);
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user