diff options
author | Christian Schneppe <christian@pix-art.de> | 2017-06-11 19:54:51 +0200 |
---|---|---|
committer | Christian Schneppe <christian@pix-art.de> | 2017-06-11 19:54:51 +0200 |
commit | db3cb3066c1206c0756e5eba85849b4e4ecd13e2 (patch) | |
tree | c921632c5e163e151e9e1b321ca3a90e235ca8e4 /src/main | |
parent | d494a6d3908c04d9be140a79af91619b87ce3add (diff) |
correct resend text
Diffstat (limited to 'src/main')
-rw-r--r-- | src/main/java/de/pixart/messenger/ui/adapter/MessageAdapter.java | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/src/main/java/de/pixart/messenger/ui/adapter/MessageAdapter.java b/src/main/java/de/pixart/messenger/ui/adapter/MessageAdapter.java index c451015cf..efbfa703f 100644 --- a/src/main/java/de/pixart/messenger/ui/adapter/MessageAdapter.java +++ b/src/main/java/de/pixart/messenger/ui/adapter/MessageAdapter.java @@ -92,6 +92,7 @@ public class MessageAdapter extends ArrayAdapter<Message> implements CopyTextVie + Patterns.GOOD_IRI_CHAR + "\\;\\/\\?\\@\\&\\=\\#\\~\\-\\.\\+\\!\\*\\'\\(\\)\\,\\_])" + "|(?:\\%[a-fA-F0-9]{2}))+"); + boolean isResendable = false; private static final Linkify.TransformFilter WEBURL_TRANSFORM_FILTER = new Linkify.TransformFilter() { @Override @@ -234,7 +235,7 @@ public class MessageAdapter extends ArrayAdapter<Message> implements CopyTextVie } break; case Message.STATUS_SEND_FAILED: - if (activity.xmppConnectionService.mHttpConnectionManager.getAutoAcceptFileSize() >= message.getFileParams().size) { + if (isResendable) { info = getContext().getString(R.string.send_failed_resend); } else { info = getContext().getString(R.string.send_failed); @@ -252,9 +253,12 @@ public class MessageAdapter extends ArrayAdapter<Message> implements CopyTextVie DownloadableFile file = activity.xmppConnectionService.getFileBackend().getFile(message); if (file.exists()) { if (activity.xmppConnectionService.mHttpConnectionManager.getAutoAcceptFileSize() >= message.getFileParams().size) { + isResendable = false; viewHolder.resend_button.setVisibility(View.GONE); } else { + isResendable = true; viewHolder.resend_button.setVisibility(View.VISIBLE); + } } viewHolder.resend_button.setText(R.string.send_again); |