show S3 file transfer in server info if http upload is n/a

Daniel Gultsch created

Change summary

src/main/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(-)

Detailed changes

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

src/main/res/layout/activity_edit_account.xml 🔗

@@ -451,6 +451,7 @@
                                 android:layout_height="wrap_content">
 
                                 <TextView
+                                    android:id="@+id/server_info_http_upload_description"
                                     android:layout_width="wrap_content"
                                     android:layout_height="wrap_content"
                                     android:ellipsize="end"

src/main/res/values/strings.xml 🔗

@@ -712,4 +712,5 @@
     <string name="pref_use_share_location_plugin_summary">Use the Share Location Plugin instead of the build in map</string>
     <string name="copy_link">Copy web address</string>
     <string name="copy_jabber_id">Copy Jabber ID</string>
+    <string name="p1_s3_filetransfer">HTTP File Sharing for S3</string>
 </resources>