warn user if account is offline during avatar publication

This commit is contained in:
Daniel Gultsch 2016-10-06 22:06:09 +02:00
parent 6d5f23213b
commit 187825d6c6
2 changed files with 11 additions and 4 deletions

View File

@ -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);

View File

@ -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>