From 16ce476bbca12ee57608c34346d6965cefa20f30 Mon Sep 17 00:00:00 2001 From: Daniel Gultsch Date: Mon, 27 May 2019 18:32:04 +0200 Subject: [PATCH] show negative max files size (unknown/unlimited) simply as available --- .../eu/siacs/conversations/ui/EditAccountActivity.java | 7 ++++++- 1 file 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 7c7f3b847..71a4b9ae3 100644 --- a/src/main/java/eu/siacs/conversations/ui/EditAccountActivity.java +++ b/src/main/java/eu/siacs/conversations/ui/EditAccountActivity.java @@ -1044,7 +1044,12 @@ public class EditAccountActivity extends OmemoActivity implements OnAccountUpdat this.binding.serverInfoPep.setText(R.string.server_info_unavailable); } if (features.httpUpload(0)) { - this.binding.serverInfoHttpUpload.setText(UIHelper.filesizeToString(features.getMaxHttpUploadSize())); + final long maxFileSize = features.getMaxHttpUploadSize(); + if (maxFileSize > 0) { + this.binding.serverInfoHttpUpload.setText(UIHelper.filesizeToString(maxFileSize)); + } else { + this.binding.serverInfoHttpUpload.setText(R.string.server_info_available); + } } else if (features.p1S3FileTransfer()) { this.binding.serverInfoHttpUploadDescription.setText(R.string.p1_s3_filetransfer); this.binding.serverInfoHttpUpload.setText(R.string.server_info_available);