aboutsummaryrefslogtreecommitdiffstats
path: root/src/eu/siacs/conversations/ui/ConferenceDetailsActivity.java
diff options
context:
space:
mode:
authoriNPUTmice <daniel@gultsch.de>2014-10-20 21:08:33 +0200
committeriNPUTmice <daniel@gultsch.de>2014-10-20 21:08:33 +0200
commit21961673cbcb3132d2405c3d276058b94cbdbbfc (patch)
treea4cb9ef7f8c6395c2e7fc406f2c5a5e73ef1edcb /src/eu/siacs/conversations/ui/ConferenceDetailsActivity.java
parent0bb2c3c4d5b2a4b676610276fafd50ea55f43706 (diff)
refactored avatar generation. first step
Diffstat (limited to 'src/eu/siacs/conversations/ui/ConferenceDetailsActivity.java')
-rw-r--r--src/eu/siacs/conversations/ui/ConferenceDetailsActivity.java19
1 files changed, 11 insertions, 8 deletions
diff --git a/src/eu/siacs/conversations/ui/ConferenceDetailsActivity.java b/src/eu/siacs/conversations/ui/ConferenceDetailsActivity.java
index ca3bb4a2..98bf70ed 100644
--- a/src/eu/siacs/conversations/ui/ConferenceDetailsActivity.java
+++ b/src/eu/siacs/conversations/ui/ConferenceDetailsActivity.java
@@ -201,7 +201,8 @@ public class ConferenceDetailsActivity extends XmppActivity {
private void populateView() {
mAccountJid.setText(getString(R.string.using_account, conversation
.getAccount().getJid()));
- mYourPhoto.setImageBitmap(conversation.getAccount().getImage(this, 48));
+ mYourPhoto.setImageBitmap(xmppConnectionService.getAvatarService()
+ .getAvatar(conversation.getAccount(), getPixel(48)));
setTitle(conversation.getName());
mFullJid.setText(conversation.getContactJid().split("/", 2)[0]);
mYourNick.setText(conversation.getMucOptions().getActualNick());
@@ -248,21 +249,23 @@ public class ConferenceDetailsActivity extends XmppActivity {
}
Bitmap bm;
if (user.getJid() != null) {
- Contact contact = account.getRoster().getContact(user.getJid());
- if (contact.showInRoster()) {
- bm = contact.getImage(48, this);
+ Contact contact = account.getRoster().getContactFromRoster(
+ user.getJid());
+ if (contact != null) {
+ bm = xmppConnectionService.getAvatarService().getAvatar(
+ contact, getPixel(48));
name.setText(contact.getDisplayName());
role.setText(user.getName() + " \u2022 "
+ getReadableRole(user.getRole()));
} else {
- bm = UIHelper.getContactPicture(user.getName(), 48, this,
- false);
+ bm = xmppConnectionService.getAvatarService().getAvatar(
+ user.getName(), getPixel(48));
name.setText(user.getName());
role.setText(getReadableRole(user.getRole()));
}
} else {
- bm = UIHelper
- .getContactPicture(user.getName(), 48, this, false);
+ bm = xmppConnectionService.getAvatarService().getAvatar(
+ user.getName(), getPixel(48));
name.setText(user.getName());
role.setText(getReadableRole(user.getRole()));
}