aboutsummaryrefslogtreecommitdiffstats
path: root/src/main/java/de/pixart/messenger
diff options
context:
space:
mode:
authorChristian Schneppe <christian@pix-art.de>2017-02-06 22:19:53 +0100
committerChristian Schneppe <christian@pix-art.de>2017-02-06 22:19:53 +0100
commit024de5b3119ad8694e8fa2f523c13aba148127e9 (patch)
tree122f6ec1f5b89593fb1b8bc4ad0ded988bc6a1c4 /src/main/java/de/pixart/messenger
parentc8c3a38db08d2fb158beea7b09052dc248275463 (diff)
show resend button only if file exists
fixes #100
Diffstat (limited to 'src/main/java/de/pixart/messenger')
-rw-r--r--src/main/java/de/pixart/messenger/ui/adapter/MessageAdapter.java5
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() {