aboutsummaryrefslogtreecommitdiffstats
path: root/src/main
diff options
context:
space:
mode:
Diffstat (limited to '')
-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));