aboutsummaryrefslogtreecommitdiffstats
path: root/src/main/java/de
diff options
context:
space:
mode:
authorChristian Schneppe <christian@pix-art.de>2017-11-22 21:51:26 +0100
committerChristian Schneppe <christian@pix-art.de>2017-11-22 21:51:26 +0100
commited28ad35493e8fc9444d8e05f904116385afaa66 (patch)
tree1f63aefd74533aa29ba5bd9f4b8d8ca4b118b2c3 /src/main/java/de
parent72df864d41e91d184dd20178d48e7b68df13e725 (diff)
ConversationAdapter: do not show file icon when file has been deleted
Diffstat (limited to 'src/main/java/de')
-rw-r--r--src/main/java/de/pixart/messenger/ui/adapter/ConversationAdapter.java7
1 files changed, 3 insertions, 4 deletions
diff --git a/src/main/java/de/pixart/messenger/ui/adapter/ConversationAdapter.java b/src/main/java/de/pixart/messenger/ui/adapter/ConversationAdapter.java
index 89a1f5ff1..c2e17b580 100644
--- a/src/main/java/de/pixart/messenger/ui/adapter/ConversationAdapter.java
+++ b/src/main/java/de/pixart/messenger/ui/adapter/ConversationAdapter.java
@@ -122,9 +122,8 @@ public class ConversationAdapter extends ArrayAdapter<Conversation> {
mFailed.setVisibility(View.GONE);
}
- if (message.getFileParams().width > 0
- && (message.getTransferable() == null
- || message.getTransferable().getStatus() != Transferable.STATUS_DELETED)) {
+ final boolean fileAvailable = message.getTransferable() == null || message.getTransferable().getStatus() != Transferable.STATUS_DELETED;
+ if (message.getFileParams().width > 0 && fileAvailable) {
mSenderName.setVisibility(View.GONE);
mLastMessage.setVisibility(View.GONE);
mLastMessageImage.setVisibility(View.GONE);
@@ -132,7 +131,7 @@ public class ConversationAdapter extends ArrayAdapter<Conversation> {
activity.loadBitmap(message, imagePreview);
} else {
final boolean showPreviewText;
- if (message.getType() == Message.TYPE_FILE) {
+ if (message.getType() == Message.TYPE_FILE && fileAvailable) {
if (message.getFileParams().runtime > 0) {
showPreviewText = false;
mLastMessageImage.setImageResource(activity.getThemeResource(R.attr.ic_attach_record, R.drawable.ic_attach_record));