aboutsummaryrefslogtreecommitdiffstats
path: root/src/eu/siacs/conversations/ui/ContactDetailsActivity.java
diff options
context:
space:
mode:
Diffstat (limited to 'src/eu/siacs/conversations/ui/ContactDetailsActivity.java')
-rw-r--r--src/eu/siacs/conversations/ui/ContactDetailsActivity.java15
1 files changed, 11 insertions, 4 deletions
diff --git a/src/eu/siacs/conversations/ui/ContactDetailsActivity.java b/src/eu/siacs/conversations/ui/ContactDetailsActivity.java
index 65bd5cbf..d43eee59 100644
--- a/src/eu/siacs/conversations/ui/ContactDetailsActivity.java
+++ b/src/eu/siacs/conversations/ui/ContactDetailsActivity.java
@@ -313,10 +313,7 @@ public class ContactDetailsActivity extends XmppActivity {
}
accountJidTv.setText(getString(R.string.using_account, contact
.getAccount().getJid()));
-
- UIHelper.prepareContactBadge(this, badge, contact,
- getApplicationContext());
-
+ prepareContactBadge(badge, contact);
if (contact.getSystemAccount() == null) {
badge.setOnClickListener(onBadgeClick);
}
@@ -383,6 +380,16 @@ public class ContactDetailsActivity extends XmppActivity {
}
}
+ private void prepareContactBadge(QuickContactBadge badge, Contact contact) {
+ if (contact.getSystemAccount() != null) {
+ String[] systemAccount = contact.getSystemAccount().split("#");
+ long id = Long.parseLong(systemAccount[0]);
+ badge.assignContactUri(Contacts.getLookupUri(id, systemAccount[1]));
+ }
+ badge.setImageBitmap(xmppConnectionService.getAvatarService()
+ .getAvatar(contact, getPixel(72)));
+ }
+
protected void confirmToDeleteFingerprint(final String fingerprint) {
AlertDialog.Builder builder = new AlertDialog.Builder(this);
builder.setTitle(R.string.delete_fingerprint);