aboutsummaryrefslogtreecommitdiffstats
path: root/src/main/java/eu/siacs/conversations/ui
diff options
context:
space:
mode:
authorChristian Schneppe <christian@pix-art.de>2016-06-19 20:52:37 +0200
committerChristian Schneppe <christian@pix-art.de>2016-06-19 20:52:37 +0200
commit15a0c91c3fabc780405f23c5c94233c94b650620 (patch)
treee25405864337a628294311f5bb6af5d556186927 /src/main/java/eu/siacs/conversations/ui
parent0dc21f0494339513e2c774f26c57bd6498f0b09d (diff)
fixed bug with message preview in chatlist
Diffstat (limited to 'src/main/java/eu/siacs/conversations/ui')
-rw-r--r--src/main/java/eu/siacs/conversations/ui/adapter/ConversationAdapter.java5
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);