diff options
author | Christian Schneppe <christian@pix-art.de> | 2018-11-08 20:55:38 +0100 |
---|---|---|
committer | Christian Schneppe <christian@pix-art.de> | 2018-11-08 20:55:38 +0100 |
commit | 71bcc8d3e84999c3caa271a206635ed26a869962 (patch) | |
tree | d64ad84a0c184c505a6bd545d35f80837fba4a85 /src/main/java/de/pixart | |
parent | 4437a16ffbe792fac981f54a24f00489c9b4e346 (diff) |
separate contacts and groups shared via xmpp uris
Diffstat (limited to 'src/main/java/de/pixart')
-rw-r--r-- | src/main/java/de/pixart/messenger/ui/adapter/MessageAdapter.java | 7 |
1 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); |