From 2d118b5a213c583bc8babbec93f0b4d5db4d4a47 Mon Sep 17 00:00:00 2001 From: Daniel Gultsch Date: Sat, 26 May 2018 10:17:24 +0200 Subject: [PATCH] show S3 file transfer in server info if http upload is n/a --- .../java/eu/siacs/conversations/ui/EditAccountActivity.java | 5 ++++- src/main/res/layout/activity_edit_account.xml | 1 + src/main/res/values/strings.xml | 1 + 3 files changed, 6 insertions(+), 1 deletion(-) diff --git a/src/main/java/eu/siacs/conversations/ui/EditAccountActivity.java b/src/main/java/eu/siacs/conversations/ui/EditAccountActivity.java index 3c307aa90..d0940bba3 100644 --- a/src/main/java/eu/siacs/conversations/ui/EditAccountActivity.java +++ b/src/main/java/eu/siacs/conversations/ui/EditAccountActivity.java @@ -153,7 +153,7 @@ public class EditAccountActivity extends OmemoActivity implements OnAccountUpdat boolean openPaymentUrl = mAccount != null && mAccount.getStatus() == Account.State.PAYMENT_REQUIRED; final boolean redirectionWorthyStatus = openPaymentUrl || openRegistrationUrl; URL url = connection != null && redirectionWorthyStatus ? connection.getRedirectionUrl() : null; - if (url != null && redirectionWorthyStatus && !wasDisabled) { + if (url != null && !wasDisabled) { try { startActivity(new Intent(Intent.ACTION_VIEW, Uri.parse(url.toString()))); return; @@ -1022,6 +1022,9 @@ public class EditAccountActivity extends OmemoActivity implements OnAccountUpdat } if (features.httpUpload(0)) { this.binding.serverInfoHttpUpload.setText(R.string.server_info_available); + } if (features.p1S3FileTransfer()) { + this.binding.serverInfoHttpUploadDescription.setText(R.string.p1_s3_filetransfer); + this.binding.serverInfoHttpUpload.setText(R.string.server_info_available); } else { this.binding.serverInfoHttpUpload.setText(R.string.server_info_unavailable); } diff --git a/src/main/res/layout/activity_edit_account.xml b/src/main/res/layout/activity_edit_account.xml index 1caf2d6a0..3eb5bfc1e 100644 --- a/src/main/res/layout/activity_edit_account.xml +++ b/src/main/res/layout/activity_edit_account.xml @@ -451,6 +451,7 @@ android:layout_height="wrap_content"> Use the Share Location Plugin instead of the build in map Copy web address Copy Jabber ID + HTTP File Sharing for S3