diff options
author | Daniel Gultsch <daniel@gultsch.de> | 2016-10-06 22:06:09 +0200 |
---|---|---|
committer | Daniel Gultsch <daniel@gultsch.de> | 2016-10-06 22:06:09 +0200 |
commit | 187825d6c680d259633d99c3d9a5da6450a8d37f (patch) | |
tree | 061e758578bb26a19c1701604b3d72c92d4c8c87 /src/main/java | |
parent | 6d5f23213b0e7181e782a6e7ab54ac619eb717bc (diff) |
warn user if account is offline during avatar publication
Diffstat (limited to 'src/main/java')
-rw-r--r-- | src/main/java/eu/siacs/conversations/ui/PublishProfilePictureActivity.java | 14 |
1 files changed, 10 insertions, 4 deletions
diff --git a/src/main/java/eu/siacs/conversations/ui/PublishProfilePictureActivity.java b/src/main/java/eu/siacs/conversations/ui/PublishProfilePictureActivity.java index f18013c4..9a699b51 100644 --- a/src/main/java/eu/siacs/conversations/ui/PublishProfilePictureActivity.java +++ b/src/main/java/eu/siacs/conversations/ui/PublishProfilePictureActivity.java @@ -250,8 +250,11 @@ public class PublishProfilePictureActivity extends XmppActivity { if (!support) { this.hintOrWarning .setTextColor(getWarningTextColor()); - this.hintOrWarning - .setText(R.string.error_publish_avatar_no_server_support); + if (account.getStatus() == Account.State.ONLINE) { + this.hintOrWarning.setText(R.string.error_publish_avatar_no_server_support); + } else { + this.hintOrWarning.setText(R.string.error_publish_avatar_offline); + } } } else { this.avatarUri = this.defaultUri; @@ -306,8 +309,11 @@ public class PublishProfilePictureActivity extends XmppActivity { } else { disablePublishButton(); this.hintOrWarning.setTextColor(getWarningTextColor()); - this.hintOrWarning - .setText(R.string.error_publish_avatar_no_server_support); + if (account.getStatus() == Account.State.ONLINE) { + this.hintOrWarning.setText(R.string.error_publish_avatar_no_server_support); + } else { + this.hintOrWarning.setText(R.string.error_publish_avatar_offline); + } } if (this.defaultUri != null && uri.equals(this.defaultUri)) { this.secondaryHint.setVisibility(View.INVISIBLE); |