diff options
Diffstat (limited to 'src/main')
-rw-r--r-- | src/main/java/eu/siacs/conversations/ui/adapter/ConversationAdapter.java | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/src/main/java/eu/siacs/conversations/ui/adapter/ConversationAdapter.java b/src/main/java/eu/siacs/conversations/ui/adapter/ConversationAdapter.java index 3625a371e..e9e0f41d0 100644 --- a/src/main/java/eu/siacs/conversations/ui/adapter/ConversationAdapter.java +++ b/src/main/java/eu/siacs/conversations/ui/adapter/ConversationAdapter.java @@ -98,12 +98,13 @@ public class ConversationAdapter extends ArrayAdapter<Conversation> { if ((message.getTransferable() == null - || message.getTransferable().getStatus() != Transferable.STATUS_DELETED)) { + || message.getTransferable().getStatus() != Transferable.STATUS_DELETED) + && message.getFileParams().width > 0) { if (mimeType != null && message.getMimeType().startsWith("video/")) { mLastMessage.setVisibility(View.GONE); imagePreview.setVisibility(View.VISIBLE); activity.loadVideoPreview(message, imagePreview); - } else if (message.getFileParams().width > 0) { + } else if (mimeType != null && message.getMimeType().startsWith("image/")) { mLastMessage.setVisibility(View.GONE); imagePreview.setVisibility(View.VISIBLE); activity.loadBitmap(message, imagePreview); |