aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--src/main/java/de/pixart/messenger/ui/PublishProfilePictureActivity.java14
-rw-r--r--src/main/res/values/strings.xml1
2 files changed, 11 insertions, 4 deletions
diff --git a/src/main/java/de/pixart/messenger/ui/PublishProfilePictureActivity.java b/src/main/java/de/pixart/messenger/ui/PublishProfilePictureActivity.java
index 12e71720d..423ccef9e 100644
--- a/src/main/java/de/pixart/messenger/ui/PublishProfilePictureActivity.java
+++ b/src/main/java/de/pixart/messenger/ui/PublishProfilePictureActivity.java
@@ -251,8 +251,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;
@@ -307,8 +310,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);
diff --git a/src/main/res/values/strings.xml b/src/main/res/values/strings.xml
index 1c31c87a0..9c8fb558d 100644
--- a/src/main/res/values/strings.xml
+++ b/src/main/res/values/strings.xml
@@ -714,4 +714,5 @@
<string name="delete_selected_keys">Delete selected keys</string>
<string name="missing_presence_subscription">Missing presence subscription</string>
<string name="missing_omemo_keys">Missing OMEMO keys</string>
+ <string name="error_publish_avatar_offline">You need to be connected to publish your avatar.</string>
</resources>