diff --git a/src/main/java/eu/siacs/conversations/ui/ContactDetailsActivity.java b/src/main/java/eu/siacs/conversations/ui/ContactDetailsActivity.java
index c7eec177b..6d5d2b776 100644
--- a/src/main/java/eu/siacs/conversations/ui/ContactDetailsActivity.java
+++ b/src/main/java/eu/siacs/conversations/ui/ContactDetailsActivity.java
@@ -258,7 +258,6 @@ public class ContactDetailsActivity extends OmemoActivity implements OnAccountUp
populateView();
});
binding.addContactButton.setOnClickListener(v -> showAddToRosterDialog(contact));
-
mMediaAdapter = new MediaAdapter(this, R.dimen.media_size);
this.binding.media.setAdapter(mMediaAdapter);
GridManager.setupLayoutManager(this, this.binding.media, R.dimen.media_size);
@@ -490,7 +489,6 @@ public class ContactDetailsActivity extends OmemoActivity implements OnAccountUp
}
binding.statusMessage.setText(builder);
}
-
if (contact.getOption(Contact.Options.FROM)) {
binding.detailsSendPresence.setText(R.string.send_presence_updates);
binding.detailsSendPresence.setChecked(true);
@@ -783,6 +781,19 @@ public class ContactDetailsActivity extends OmemoActivity implements OnAccountUp
xmppConnectionService.updateConversation(conversation);
});
+
+ //Show used clients of contact
+ String[] resources = contact.getPresences().toResourceArray();
+ if (resources.length == 0) {
+ binding.clients.setVisibility(View.GONE);
+ } else {
+ binding.clients.setVisibility(View.VISIBLE);
+ for (int i = 0; i < resources.length; i++) {
+ binding.clients.append(resources[i]);
+ binding.clients.append("\n");
+ }
+ }
+
populateView();
}
}
diff --git a/src/main/res/layout/activity_contact_details.xml b/src/main/res/layout/activity_contact_details.xml
index e02d48792..ab250cc1d 100644
--- a/src/main/res/layout/activity_contact_details.xml
+++ b/src/main/res/layout/activity_contact_details.xml
@@ -119,6 +119,14 @@
android:textAppearance="?textAppearanceBodyMedium"
tools:text="Hey there! I’m using monocles chat" />
+
+