fixed long press to bring back default in publish avatar activity
This commit is contained in:
parent
6952e630c4
commit
721b308f28
|
@ -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));
|
||||
if (this.defaultUri != null) {
|
||||
this.avatar
|
||||
.setOnLongClickListener(this.backToDefaultListener);
|
||||
} else {
|
||||
if (this.defaultUri != null) {
|
||||
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);
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue