correct resend text
This commit is contained in:
parent
d494a6d390
commit
db3cb3066c
1 changed files with 5 additions and 1 deletions
|
@ -92,6 +92,7 @@ public class MessageAdapter extends ArrayAdapter<Message> implements CopyTextVie
|
||||||
+ Patterns.GOOD_IRI_CHAR
|
+ Patterns.GOOD_IRI_CHAR
|
||||||
+ "\\;\\/\\?\\@\\&\\=\\#\\~\\-\\.\\+\\!\\*\\'\\(\\)\\,\\_])"
|
+ "\\;\\/\\?\\@\\&\\=\\#\\~\\-\\.\\+\\!\\*\\'\\(\\)\\,\\_])"
|
||||||
+ "|(?:\\%[a-fA-F0-9]{2}))+");
|
+ "|(?:\\%[a-fA-F0-9]{2}))+");
|
||||||
|
boolean isResendable = false;
|
||||||
|
|
||||||
private static final Linkify.TransformFilter WEBURL_TRANSFORM_FILTER = new Linkify.TransformFilter() {
|
private static final Linkify.TransformFilter WEBURL_TRANSFORM_FILTER = new Linkify.TransformFilter() {
|
||||||
@Override
|
@Override
|
||||||
|
@ -234,7 +235,7 @@ public class MessageAdapter extends ArrayAdapter<Message> implements CopyTextVie
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
case Message.STATUS_SEND_FAILED:
|
case Message.STATUS_SEND_FAILED:
|
||||||
if (activity.xmppConnectionService.mHttpConnectionManager.getAutoAcceptFileSize() >= message.getFileParams().size) {
|
if (isResendable) {
|
||||||
info = getContext().getString(R.string.send_failed_resend);
|
info = getContext().getString(R.string.send_failed_resend);
|
||||||
} else {
|
} else {
|
||||||
info = getContext().getString(R.string.send_failed);
|
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);
|
DownloadableFile file = activity.xmppConnectionService.getFileBackend().getFile(message);
|
||||||
if (file.exists()) {
|
if (file.exists()) {
|
||||||
if (activity.xmppConnectionService.mHttpConnectionManager.getAutoAcceptFileSize() >= message.getFileParams().size) {
|
if (activity.xmppConnectionService.mHttpConnectionManager.getAutoAcceptFileSize() >= message.getFileParams().size) {
|
||||||
|
isResendable = false;
|
||||||
viewHolder.resend_button.setVisibility(View.GONE);
|
viewHolder.resend_button.setVisibility(View.GONE);
|
||||||
} else {
|
} else {
|
||||||
|
isResendable = true;
|
||||||
viewHolder.resend_button.setVisibility(View.VISIBLE);
|
viewHolder.resend_button.setVisibility(View.VISIBLE);
|
||||||
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
viewHolder.resend_button.setText(R.string.send_again);
|
viewHolder.resend_button.setText(R.string.send_again);
|
||||||
|
|
Reference in a new issue