aboutsummaryrefslogtreecommitdiffstats
path: root/src/eu/siacs/conversations/ui/PublishProfilePictureActivity.java
diff options
context:
space:
mode:
authoriNPUTmice <daniel@gultsch.de>2014-08-05 13:00:06 +0200
committeriNPUTmice <daniel@gultsch.de>2014-08-05 13:00:06 +0200
commit08755e56a5bf861c97eefd545f629ac67a804275 (patch)
treec7f5ce044e860d328cd87d30e88d7092a9f581c8 /src/eu/siacs/conversations/ui/PublishProfilePictureActivity.java
parent9aba9a4059bdc1c2f369585ef6faeada320529d2 (diff)
show own avatar after publication. no persistancy yet
Diffstat (limited to '')
-rw-r--r--src/eu/siacs/conversations/ui/PublishProfilePictureActivity.java16
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());
}
}