aboutsummaryrefslogtreecommitdiffstats
path: root/src/main
diff options
context:
space:
mode:
authorDaniel Gultsch <daniel@gultsch.de>2016-10-06 22:06:09 +0200
committerDaniel Gultsch <daniel@gultsch.de>2016-10-06 22:06:09 +0200
commit187825d6c680d259633d99c3d9a5da6450a8d37f (patch)
tree061e758578bb26a19c1701604b3d72c92d4c8c87 /src/main
parent6d5f23213b0e7181e782a6e7ab54ac619eb717bc (diff)
warn user if account is offline during avatar publication
Diffstat (limited to '')
-rw-r--r--src/main/java/eu/siacs/conversations/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/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);
diff --git a/src/main/res/values/strings.xml b/src/main/res/values/strings.xml
index 79da0a2f..c7c791df 100644
--- a/src/main/res/values/strings.xml
+++ b/src/main/res/values/strings.xml
@@ -692,4 +692,5 @@
<string name="pref_delete_omemo_identities">Delete OMEMO identities</string>
<string name="pref_delete_omemo_identities_summary">Regenerate your OMEMO keys. All your contacts will have to verify you again. Use this only as a last resort.</string>
<string name="delete_selected_keys">Delete selected keys</string>
+ <string name="error_publish_avatar_offline">You need to be connected to publish your avatar.</string>
</resources>