aboutsummaryrefslogtreecommitdiffstats
path: root/src/main
diff options
context:
space:
mode:
Diffstat (limited to 'src/main')
-rw-r--r--src/main/java/eu/siacs/conversations/entities/Contact.java16
-rw-r--r--src/main/res/drawable-hdpi/ic_activity.pngbin3040 -> 0 bytes
-rw-r--r--src/main/res/drawable-hdpi/ic_launcher.pngbin4416 -> 5190 bytes
-rw-r--r--src/main/res/drawable-mdpi/ic_activity.pngbin1854 -> 0 bytes
-rw-r--r--src/main/res/drawable-mdpi/ic_launcher.pngbin2726 -> 3057 bytes
-rw-r--r--src/main/res/drawable-xhdpi/ic_activity.pngbin4349 -> 0 bytes
-rw-r--r--src/main/res/drawable-xhdpi/ic_launcher.pngbin6503 -> 7477 bytes
-rw-r--r--src/main/res/drawable-xxhdpi/ic_activity.pngbin7209 -> 0 bytes
-rw-r--r--src/main/res/drawable-xxhdpi/ic_launcher.pngbin11054 -> 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
deleted file mode 100644
index 613da683..00000000
--- a/src/main/res/drawable-hdpi/ic_activity.png
+++ /dev/null
Binary files differ
diff --git a/src/main/res/drawable-hdpi/ic_launcher.png b/src/main/res/drawable-hdpi/ic_launcher.png
index d48df2c3..88c4dba2 100644
--- a/src/main/res/drawable-hdpi/ic_launcher.png
+++ b/src/main/res/drawable-hdpi/ic_launcher.png
Binary files differ
diff --git a/src/main/res/drawable-mdpi/ic_activity.png b/src/main/res/drawable-mdpi/ic_activity.png
deleted file mode 100644
index c8727f57..00000000
--- a/src/main/res/drawable-mdpi/ic_activity.png
+++ /dev/null
Binary files differ
diff --git a/src/main/res/drawable-mdpi/ic_launcher.png b/src/main/res/drawable-mdpi/ic_launcher.png
index 200daf4c..c366d920 100644
--- a/src/main/res/drawable-mdpi/ic_launcher.png
+++ b/src/main/res/drawable-mdpi/ic_launcher.png
Binary files differ
diff --git a/src/main/res/drawable-xhdpi/ic_activity.png b/src/main/res/drawable-xhdpi/ic_activity.png
deleted file mode 100644
index 95ffbecf..00000000
--- a/src/main/res/drawable-xhdpi/ic_activity.png
+++ /dev/null
Binary files differ
diff --git a/src/main/res/drawable-xhdpi/ic_launcher.png b/src/main/res/drawable-xhdpi/ic_launcher.png
index 927a2d2a..f8fd9f56 100644
--- a/src/main/res/drawable-xhdpi/ic_launcher.png
+++ b/src/main/res/drawable-xhdpi/ic_launcher.png
Binary files differ
diff --git a/src/main/res/drawable-xxhdpi/ic_activity.png b/src/main/res/drawable-xxhdpi/ic_activity.png
deleted file mode 100644
index 0b642d9b..00000000
--- a/src/main/res/drawable-xxhdpi/ic_activity.png
+++ /dev/null
Binary files differ
diff --git a/src/main/res/drawable-xxhdpi/ic_launcher.png b/src/main/res/drawable-xxhdpi/ic_launcher.png
index 65c1af34..9a10d949 100644
--- a/src/main/res/drawable-xxhdpi/ic_launcher.png
+++ b/src/main/res/drawable-xxhdpi/ic_launcher.png
Binary files differ