aboutsummaryrefslogtreecommitdiffstats
path: root/src/eu
diff options
context:
space:
mode:
Diffstat (limited to 'src/eu')
-rw-r--r--src/eu/siacs/conversations/ui/PublishProfilePictureActivity.java21
1 files changed, 14 insertions, 7 deletions
diff --git a/src/eu/siacs/conversations/ui/PublishProfilePictureActivity.java b/src/eu/siacs/conversations/ui/PublishProfilePictureActivity.java
index 0661f1a9..434d1d4d 100644
--- a/src/eu/siacs/conversations/ui/PublishProfilePictureActivity.java
+++ b/src/eu/siacs/conversations/ui/PublishProfilePictureActivity.java
@@ -154,16 +154,23 @@ public class PublishProfilePictureActivity extends XmppActivity {
this.support = this.account.getXmppConnection().getFeatures().pubsub();
}
if (this.avatarUri == null) {
- if (this.account.getAvatar() != null) {
+ if (this.account.getAvatar() != null || this.defaultUri == null) {
this.avatar.setImageBitmap(this.account.getImage(
getApplicationContext(), 384));
- this.avatar
- .setOnLongClickListener(this.backToDefaultListener);
- } else {
if (this.defaultUri != null) {
- this.avatarUri = this.defaultUri;
- loadImageIntoPreview(this.defaultUri);
+ this.avatar
+ .setOnLongClickListener(this.backToDefaultListener);
+ } else {
+ this.secondaryHint.setVisibility(View.INVISIBLE);
}
+ if (!support) {
+ this.hintOrWarning.setTextColor(getWarningTextColor());
+ this.hintOrWarning.setText(R.string.error_publish_avatar_no_server_support);
+ }
+ } else {
+ this.avatarUri = this.defaultUri;
+ loadImageIntoPreview(this.defaultUri);
+ this.secondaryHint.setVisibility(View.INVISIBLE);
}
} else {
loadImageIntoPreview(avatarUri);
@@ -191,7 +198,7 @@ public class PublishProfilePictureActivity extends XmppActivity {
if (this.defaultUri != null && uri.equals(this.defaultUri)) {
this.secondaryHint.setVisibility(View.INVISIBLE);
this.avatar.setOnLongClickListener(null);
- } else {
+ } else if (this.defaultUri != null ) {
this.secondaryHint.setVisibility(View.VISIBLE);
this.avatar.setOnLongClickListener(this.backToDefaultListener);
}