diff options
Diffstat (limited to 'src')
-rw-r--r-- | src/main/java/eu/siacs/conversations/entities/Contact.java | 16 | ||||
-rw-r--r-- | src/main/res/drawable-hdpi/ic_activity.png | bin | 3040 -> 0 bytes | |||
-rw-r--r-- | src/main/res/drawable-hdpi/ic_launcher.png | bin | 4416 -> 5190 bytes | |||
-rw-r--r-- | src/main/res/drawable-mdpi/ic_activity.png | bin | 1854 -> 0 bytes | |||
-rw-r--r-- | src/main/res/drawable-mdpi/ic_launcher.png | bin | 2726 -> 3057 bytes | |||
-rw-r--r-- | src/main/res/drawable-xhdpi/ic_activity.png | bin | 4349 -> 0 bytes | |||
-rw-r--r-- | src/main/res/drawable-xhdpi/ic_launcher.png | bin | 6503 -> 7477 bytes | |||
-rw-r--r-- | src/main/res/drawable-xxhdpi/ic_activity.png | bin | 7209 -> 0 bytes | |||
-rw-r--r-- | src/main/res/drawable-xxhdpi/ic_launcher.png | bin | 11054 -> 12738 bytes |
9 files changed, 13 insertions, 3 deletions
diff --git a/src/main/java/eu/siacs/conversations/entities/Contact.java b/src/main/java/eu/siacs/conversations/entities/Contact.java index 99a74907..a451c142 100644 --- a/src/main/java/eu/siacs/conversations/entities/Contact.java +++ b/src/main/java/eu/siacs/conversations/entities/Contact.java @@ -145,11 +145,21 @@ public class Contact implements ListItem { } public boolean match(String needle) { - if (needle == null) { + if (needle == null || needle.isEmpty()) { return true; } - needle = needle.toLowerCase(); - return jid.toString().contains(needle) || getDisplayName().toLowerCase().contains(needle) || matchInTag(needle); + needle = needle.toLowerCase().trim(); + String[] parts = needle.split("\\s+"); + if (parts.length > 1) { + for(int i = 0; i < parts.length; ++i) { + if (!match(parts[i])) { + return false; + } + } + return true; + } else { + return jid.toString().contains(needle) || getDisplayName().toLowerCase().contains(needle) || matchInTag(needle); + } } private boolean matchInTag(String needle) { diff --git a/src/main/res/drawable-hdpi/ic_activity.png b/src/main/res/drawable-hdpi/ic_activity.png Binary files differdeleted file mode 100644 index 613da683..00000000 --- a/src/main/res/drawable-hdpi/ic_activity.png +++ /dev/null diff --git a/src/main/res/drawable-hdpi/ic_launcher.png b/src/main/res/drawable-hdpi/ic_launcher.png Binary files differindex d48df2c3..88c4dba2 100644 --- a/src/main/res/drawable-hdpi/ic_launcher.png +++ b/src/main/res/drawable-hdpi/ic_launcher.png diff --git a/src/main/res/drawable-mdpi/ic_activity.png b/src/main/res/drawable-mdpi/ic_activity.png Binary files differdeleted file mode 100644 index c8727f57..00000000 --- a/src/main/res/drawable-mdpi/ic_activity.png +++ /dev/null diff --git a/src/main/res/drawable-mdpi/ic_launcher.png b/src/main/res/drawable-mdpi/ic_launcher.png Binary files differindex 200daf4c..c366d920 100644 --- a/src/main/res/drawable-mdpi/ic_launcher.png +++ b/src/main/res/drawable-mdpi/ic_launcher.png diff --git a/src/main/res/drawable-xhdpi/ic_activity.png b/src/main/res/drawable-xhdpi/ic_activity.png Binary files differdeleted file mode 100644 index 95ffbecf..00000000 --- a/src/main/res/drawable-xhdpi/ic_activity.png +++ /dev/null diff --git a/src/main/res/drawable-xhdpi/ic_launcher.png b/src/main/res/drawable-xhdpi/ic_launcher.png Binary files differindex 927a2d2a..f8fd9f56 100644 --- a/src/main/res/drawable-xhdpi/ic_launcher.png +++ b/src/main/res/drawable-xhdpi/ic_launcher.png diff --git a/src/main/res/drawable-xxhdpi/ic_activity.png b/src/main/res/drawable-xxhdpi/ic_activity.png Binary files differdeleted file mode 100644 index 0b642d9b..00000000 --- a/src/main/res/drawable-xxhdpi/ic_activity.png +++ /dev/null diff --git a/src/main/res/drawable-xxhdpi/ic_launcher.png b/src/main/res/drawable-xxhdpi/ic_launcher.png Binary files differindex 65c1af34..9a10d949 100644 --- a/src/main/res/drawable-xxhdpi/ic_launcher.png +++ b/src/main/res/drawable-xxhdpi/ic_launcher.png |