diff options
author | iNPUTmice <daniel@gultsch.de> | 2014-08-05 13:00:06 +0200 |
---|---|---|
committer | iNPUTmice <daniel@gultsch.de> | 2014-08-05 13:00:06 +0200 |
commit | 08755e56a5bf861c97eefd545f629ac67a804275 (patch) | |
tree | c7f5ce044e860d328cd87d30e88d7092a9f581c8 /src/eu/siacs/conversations/ui/PublishProfilePictureActivity.java | |
parent | 9aba9a4059bdc1c2f369585ef6faeada320529d2 (diff) |
show own avatar after publication. no persistancy yet
Diffstat (limited to '')
-rw-r--r-- | src/eu/siacs/conversations/ui/PublishProfilePictureActivity.java | 16 |
1 files changed, 13 insertions, 3 deletions
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()); } } |