From 08755e56a5bf861c97eefd545f629ac67a804275 Mon Sep 17 00:00:00 2001 From: iNPUTmice Date: Tue, 5 Aug 2014 13:00:06 +0200 Subject: show own avatar after publication. no persistancy yet --- .../conversations/ui/PublishProfilePictureActivity.java | 16 +++++++++++++--- 1 file changed, 13 insertions(+), 3 deletions(-) (limited to 'src/eu/siacs/conversations/ui/PublishProfilePictureActivity.java') diff --git a/src/eu/siacs/conversations/ui/PublishProfilePictureActivity.java b/src/eu/siacs/conversations/ui/PublishProfilePictureActivity.java index 353600ef..fcb94efa 100644 --- a/src/eu/siacs/conversations/ui/PublishProfilePictureActivity.java +++ b/src/eu/siacs/conversations/ui/PublishProfilePictureActivity.java @@ -5,6 +5,7 @@ import android.content.Intent; import android.graphics.Bitmap; import android.net.Uri; import android.os.Bundle; +import android.util.Log; import android.view.MenuItem; import android.view.View; import android.view.View.OnClickListener; @@ -134,10 +135,19 @@ public class PublishProfilePictureActivity extends XmppActivity { if (jid != null) { this.account = xmppConnectionService.findAccountByJid(jid); if (this.avatarUri == null) { - avatarUri = PhoneHelper - .getSefliUri(getApplicationContext()); + if (this.account.getAvatar() != null) { + this.avatar.setImageBitmap(this.account.getImage( + getApplicationContext(), 384)); + } else { + this.avatarUri = PhoneHelper + .getSefliUri(getApplicationContext()); + if (this.avatarUri != null) { + loadImageIntoPreview(this.avatarUri); + } + } + } else { + loadImageIntoPreview(avatarUri); } - loadImageIntoPreview(avatarUri); this.accountTextView.setText(this.account.getJid()); } } -- cgit v1.2.3