diff options
author | Christian Schneppe <christian@pix-art.de> | 2019-06-08 14:19:57 +0200 |
---|---|---|
committer | Christian Schneppe <christian@pix-art.de> | 2019-06-08 14:19:57 +0200 |
commit | 3839dff5b3e330f3c95b9c01305c4ce974338905 (patch) | |
tree | 2710218484dec61de8bb8a50f097d1d1fd23febb /src/main/java | |
parent | ed244ed74bc611ffbb3fcc052338333ac603a5f4 (diff) |
show negative max files size (unknown/unlimited) simply as available
Diffstat (limited to 'src/main/java')
-rw-r--r-- | src/main/java/de/pixart/messenger/ui/EditAccountActivity.java | 9 |
1 files changed, 7 insertions, 2 deletions
diff --git a/src/main/java/de/pixart/messenger/ui/EditAccountActivity.java b/src/main/java/de/pixart/messenger/ui/EditAccountActivity.java index 33d0a8e7c..e2b590d05 100644 --- a/src/main/java/de/pixart/messenger/ui/EditAccountActivity.java +++ b/src/main/java/de/pixart/messenger/ui/EditAccountActivity.java @@ -918,7 +918,7 @@ public class EditAccountActivity extends OmemoActivity implements OnAccountUpdat private String getSupportSite(String domain) { int i = -1; - for (String domains: getResources().getStringArray(R.array.support_domains)) { + for (String domains : getResources().getStringArray(R.array.support_domains)) { i++; if (domains.equals(domain)) { return getResources().getStringArray(R.array.support_site)[i]; @@ -1173,7 +1173,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); |