diff options
-rw-r--r-- | src/main/java/de/pixart/messenger/ui/adapter/MessageAdapter.java | 5 |
1 files changed, 4 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 460d3337c..b125a9f0b 100644 --- a/src/main/java/de/pixart/messenger/ui/adapter/MessageAdapter.java +++ b/src/main/java/de/pixart/messenger/ui/adapter/MessageAdapter.java @@ -244,7 +244,10 @@ public class MessageAdapter extends ArrayAdapter<Message> implements CopyTextVie } if (error && type == SENT) { viewHolder.time.setTextColor(activity.getWarningTextColor()); - viewHolder.resend_button.setVisibility(View.VISIBLE); + DownloadableFile file = activity.xmppConnectionService.getFileBackend().getFile(message); + if (file.exists()) { + viewHolder.resend_button.setVisibility(View.VISIBLE); + } viewHolder.resend_button.setText(R.string.send_again); viewHolder.resend_button.setCompoundDrawablesWithIntrinsicBounds(R.drawable.ic_resend_grey600_48dp, 0, 0, 0); viewHolder.resend_button.setOnClickListener(new OnClickListener() { |