aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorChristian Schneppe <christian@pix-art.de>2018-11-08 20:55:38 +0100
committerChristian Schneppe <christian@pix-art.de>2018-11-08 20:55:38 +0100
commit71bcc8d3e84999c3caa271a206635ed26a869962 (patch)
treed64ad84a0c184c505a6bd545d35f80837fba4a85
parent4437a16ffbe792fac981f54a24f00489c9b4e346 (diff)
separate contacts and groups shared via xmpp uris
-rw-r--r--src/main/java/de/pixart/messenger/ui/adapter/MessageAdapter.java7
-rw-r--r--src/main/res/drawable-hdpi/ic_account_multiple_plus_grey600_48dp.pngbin0 -> 1023 bytes
-rw-r--r--src/main/res/drawable-hdpi/ic_account_plus_grey600_48dp.pngbin0 -> 916 bytes
-rw-r--r--src/main/res/drawable-mdpi/ic_account_multiple_plus_grey600_48dp.pngbin0 -> 1002 bytes
-rw-r--r--src/main/res/drawable-mdpi/ic_account_plus_grey600_48dp.pngbin0 -> 795 bytes
-rw-r--r--src/main/res/drawable-xhdpi/ic_account_multiple_plus_grey600_48dp.pngbin0 -> 1949 bytes
-rw-r--r--src/main/res/drawable-xhdpi/ic_account_plus_grey600_48dp.pngbin0 -> 1597 bytes
-rw-r--r--src/main/res/drawable-xxhdpi/ic_account_multiple_plus_grey600_48dp.pngbin0 -> 2156 bytes
-rw-r--r--src/main/res/drawable-xxhdpi/ic_account_plus_grey600_48dp.pngbin0 -> 1905 bytes
-rw-r--r--src/main/res/drawable-xxxhdpi/ic_account_multiple_plus_grey600_48dp.pngbin0 -> 6100 bytes
-rw-r--r--src/main/res/drawable-xxxhdpi/ic_account_plus_grey600_48dp.pngbin0 -> 4815 bytes
11 files changed, 6 insertions, 1 deletions
diff --git a/src/main/java/de/pixart/messenger/ui/adapter/MessageAdapter.java b/src/main/java/de/pixart/messenger/ui/adapter/MessageAdapter.java
index dd24c440d..8ba2587b5 100644
--- a/src/main/java/de/pixart/messenger/ui/adapter/MessageAdapter.java
+++ b/src/main/java/de/pixart/messenger/ui/adapter/MessageAdapter.java
@@ -413,12 +413,17 @@ public class MessageAdapter extends ArrayAdapter<Message> implements CopyTextVie
private void displayXmppMessage(final ViewHolder viewHolder, final String body) {
String contact = body.toLowerCase();
contact = contact.split(":")[1];
+ boolean group = (contact.split("\\?")[1]) != null && (contact.split("\\?")[1]).length() > 0 && (contact.split("\\?")[1]).equalsIgnoreCase("join");
contact = contact.split("\\?")[0];
String add_contact = activity.getString(R.string.add_to_contact_list) + " (" + contact + ")";
viewHolder.audioPlayer.setVisibility(View.GONE);
viewHolder.download_button.setVisibility(View.VISIBLE);
viewHolder.download_button.setText(add_contact);
- viewHolder.download_button.setCompoundDrawablesWithIntrinsicBounds(R.drawable.ic_account_card_details_grey600_48dp, 0, 0, 0);
+ if (group) {
+ viewHolder.download_button.setCompoundDrawablesWithIntrinsicBounds(R.drawable.ic_account_multiple_plus_grey600_48dp, 0, 0, 0);
+ } else {
+ viewHolder.download_button.setCompoundDrawablesWithIntrinsicBounds(R.drawable.ic_account_plus_grey600_48dp, 0, 0, 0);
+ }
viewHolder.download_button.setOnClickListener(v -> {
try {
Intent intent = new Intent(Intent.ACTION_VIEW);
diff --git a/src/main/res/drawable-hdpi/ic_account_multiple_plus_grey600_48dp.png b/src/main/res/drawable-hdpi/ic_account_multiple_plus_grey600_48dp.png
new file mode 100644
index 000000000..43518be0c
--- /dev/null
+++ b/src/main/res/drawable-hdpi/ic_account_multiple_plus_grey600_48dp.png
Binary files differ
diff --git a/src/main/res/drawable-hdpi/ic_account_plus_grey600_48dp.png b/src/main/res/drawable-hdpi/ic_account_plus_grey600_48dp.png
new file mode 100644
index 000000000..f922777ef
--- /dev/null
+++ b/src/main/res/drawable-hdpi/ic_account_plus_grey600_48dp.png
Binary files differ
diff --git a/src/main/res/drawable-mdpi/ic_account_multiple_plus_grey600_48dp.png b/src/main/res/drawable-mdpi/ic_account_multiple_plus_grey600_48dp.png
new file mode 100644
index 000000000..bc1099bd2
--- /dev/null
+++ b/src/main/res/drawable-mdpi/ic_account_multiple_plus_grey600_48dp.png
Binary files differ
diff --git a/src/main/res/drawable-mdpi/ic_account_plus_grey600_48dp.png b/src/main/res/drawable-mdpi/ic_account_plus_grey600_48dp.png
new file mode 100644
index 000000000..da2e9201d
--- /dev/null
+++ b/src/main/res/drawable-mdpi/ic_account_plus_grey600_48dp.png
Binary files differ
diff --git a/src/main/res/drawable-xhdpi/ic_account_multiple_plus_grey600_48dp.png b/src/main/res/drawable-xhdpi/ic_account_multiple_plus_grey600_48dp.png
new file mode 100644
index 000000000..104d3284f
--- /dev/null
+++ b/src/main/res/drawable-xhdpi/ic_account_multiple_plus_grey600_48dp.png
Binary files differ
diff --git a/src/main/res/drawable-xhdpi/ic_account_plus_grey600_48dp.png b/src/main/res/drawable-xhdpi/ic_account_plus_grey600_48dp.png
new file mode 100644
index 000000000..9824b4aa8
--- /dev/null
+++ b/src/main/res/drawable-xhdpi/ic_account_plus_grey600_48dp.png
Binary files differ
diff --git a/src/main/res/drawable-xxhdpi/ic_account_multiple_plus_grey600_48dp.png b/src/main/res/drawable-xxhdpi/ic_account_multiple_plus_grey600_48dp.png
new file mode 100644
index 000000000..ef22d5cea
--- /dev/null
+++ b/src/main/res/drawable-xxhdpi/ic_account_multiple_plus_grey600_48dp.png
Binary files differ
diff --git a/src/main/res/drawable-xxhdpi/ic_account_plus_grey600_48dp.png b/src/main/res/drawable-xxhdpi/ic_account_plus_grey600_48dp.png
new file mode 100644
index 000000000..9e4797692
--- /dev/null
+++ b/src/main/res/drawable-xxhdpi/ic_account_plus_grey600_48dp.png
Binary files differ
diff --git a/src/main/res/drawable-xxxhdpi/ic_account_multiple_plus_grey600_48dp.png b/src/main/res/drawable-xxxhdpi/ic_account_multiple_plus_grey600_48dp.png
new file mode 100644
index 000000000..bb0090be1
--- /dev/null
+++ b/src/main/res/drawable-xxxhdpi/ic_account_multiple_plus_grey600_48dp.png
Binary files differ
diff --git a/src/main/res/drawable-xxxhdpi/ic_account_plus_grey600_48dp.png b/src/main/res/drawable-xxxhdpi/ic_account_plus_grey600_48dp.png
new file mode 100644
index 000000000..37bf7dbab
--- /dev/null
+++ b/src/main/res/drawable-xxxhdpi/ic_account_plus_grey600_48dp.png
Binary files differ