From 71bcc8d3e84999c3caa271a206635ed26a869962 Mon Sep 17 00:00:00 2001 From: Christian Schneppe Date: Thu, 8 Nov 2018 20:55:38 +0100 Subject: separate contacts and groups shared via xmpp uris --- .../de/pixart/messenger/ui/adapter/MessageAdapter.java | 7 ++++++- .../ic_account_multiple_plus_grey600_48dp.png | Bin 0 -> 1023 bytes .../res/drawable-hdpi/ic_account_plus_grey600_48dp.png | Bin 0 -> 916 bytes .../ic_account_multiple_plus_grey600_48dp.png | Bin 0 -> 1002 bytes .../res/drawable-mdpi/ic_account_plus_grey600_48dp.png | Bin 0 -> 795 bytes .../ic_account_multiple_plus_grey600_48dp.png | Bin 0 -> 1949 bytes .../res/drawable-xhdpi/ic_account_plus_grey600_48dp.png | Bin 0 -> 1597 bytes .../ic_account_multiple_plus_grey600_48dp.png | Bin 0 -> 2156 bytes .../res/drawable-xxhdpi/ic_account_plus_grey600_48dp.png | Bin 0 -> 1905 bytes .../ic_account_multiple_plus_grey600_48dp.png | Bin 0 -> 6100 bytes .../drawable-xxxhdpi/ic_account_plus_grey600_48dp.png | Bin 0 -> 4815 bytes 11 files changed, 6 insertions(+), 1 deletion(-) create mode 100644 src/main/res/drawable-hdpi/ic_account_multiple_plus_grey600_48dp.png create mode 100644 src/main/res/drawable-hdpi/ic_account_plus_grey600_48dp.png create mode 100644 src/main/res/drawable-mdpi/ic_account_multiple_plus_grey600_48dp.png create mode 100644 src/main/res/drawable-mdpi/ic_account_plus_grey600_48dp.png create mode 100644 src/main/res/drawable-xhdpi/ic_account_multiple_plus_grey600_48dp.png create mode 100644 src/main/res/drawable-xhdpi/ic_account_plus_grey600_48dp.png create mode 100644 src/main/res/drawable-xxhdpi/ic_account_multiple_plus_grey600_48dp.png create mode 100644 src/main/res/drawable-xxhdpi/ic_account_plus_grey600_48dp.png create mode 100644 src/main/res/drawable-xxxhdpi/ic_account_multiple_plus_grey600_48dp.png create mode 100644 src/main/res/drawable-xxxhdpi/ic_account_plus_grey600_48dp.png 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 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 Binary files /dev/null and b/src/main/res/drawable-hdpi/ic_account_multiple_plus_grey600_48dp.png 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 Binary files /dev/null and b/src/main/res/drawable-hdpi/ic_account_plus_grey600_48dp.png 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 Binary files /dev/null and b/src/main/res/drawable-mdpi/ic_account_multiple_plus_grey600_48dp.png 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 Binary files /dev/null and b/src/main/res/drawable-mdpi/ic_account_plus_grey600_48dp.png 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 Binary files /dev/null and b/src/main/res/drawable-xhdpi/ic_account_multiple_plus_grey600_48dp.png 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 Binary files /dev/null and b/src/main/res/drawable-xhdpi/ic_account_plus_grey600_48dp.png 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 Binary files /dev/null and b/src/main/res/drawable-xxhdpi/ic_account_multiple_plus_grey600_48dp.png 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 Binary files /dev/null and b/src/main/res/drawable-xxhdpi/ic_account_plus_grey600_48dp.png 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 Binary files /dev/null and b/src/main/res/drawable-xxxhdpi/ic_account_multiple_plus_grey600_48dp.png 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 Binary files /dev/null and b/src/main/res/drawable-xxxhdpi/ic_account_plus_grey600_48dp.png differ -- cgit v1.2.3