diff options
author | Christian Schneppe <christian@pix-art.de> | 2016-06-20 21:00:41 +0200 |
---|---|---|
committer | Christian Schneppe <christian@pix-art.de> | 2016-06-20 21:00:41 +0200 |
commit | ebc585457b3b78d01ac769648e19e33bb4b308c8 (patch) | |
tree | 32061fd053a9d666510ea6cc92ee8a009f73f2af | |
parent | cdf34ece42831abe31b69359bb9f4a02d386daaf (diff) |
hide all graphical previews in chatlist
-rw-r--r-- | src/main/java/eu/siacs/conversations/ui/adapter/ConversationAdapter.java | 15 |
1 files changed, 9 insertions, 6 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 e9e0f41d0..97c453586 100644 --- a/src/main/java/eu/siacs/conversations/ui/adapter/ConversationAdapter.java +++ b/src/main/java/eu/siacs/conversations/ui/adapter/ConversationAdapter.java @@ -7,6 +7,7 @@ import android.graphics.Typeface; import android.graphics.drawable.BitmapDrawable; import android.graphics.drawable.Drawable; import android.os.AsyncTask; +import android.util.Log; import android.util.Pair; import android.view.LayoutInflater; import android.view.View; @@ -15,14 +16,17 @@ import android.widget.ArrayAdapter; import android.widget.ImageView; import android.widget.TextView; +import java.io.File; import java.lang.ref.WeakReference; import java.util.List; import java.util.concurrent.RejectedExecutionException; +import eu.siacs.conversations.Config; import eu.siacs.conversations.R; import eu.siacs.conversations.entities.Conversation; import eu.siacs.conversations.entities.Message; import eu.siacs.conversations.entities.Transferable; +import eu.siacs.conversations.services.XmppConnectionService; import eu.siacs.conversations.ui.ConversationActivity; import eu.siacs.conversations.ui.XmppActivity; import eu.siacs.conversations.utils.UIHelper; @@ -97,14 +101,13 @@ public class ConversationAdapter extends ArrayAdapter<Conversation> { } - if ((message.getTransferable() == null - || message.getTransferable().getStatus() != Transferable.STATUS_DELETED) - && message.getFileParams().width > 0) { + /*if (message.getTransferable() == null + || message.getTransferable().getStatus() != Transferable.STATUS_DELETED) { if (mimeType != null && message.getMimeType().startsWith("video/")) { mLastMessage.setVisibility(View.GONE); imagePreview.setVisibility(View.VISIBLE); activity.loadVideoPreview(message, imagePreview); - } else if (mimeType != null && message.getMimeType().startsWith("image/")) { + } else if (message.getFileParams().width > 0) { mLastMessage.setVisibility(View.GONE); imagePreview.setVisibility(View.VISIBLE); activity.loadBitmap(message, imagePreview); @@ -127,7 +130,7 @@ public class ConversationAdapter extends ArrayAdapter<Conversation> { } } } - } else { + } else {*/ Pair<String, Boolean> preview = UIHelper.getMessagePreview(activity, message); mLastMessage.setVisibility(View.VISIBLE); imagePreview.setVisibility(View.GONE); @@ -145,7 +148,7 @@ public class ConversationAdapter extends ArrayAdapter<Conversation> { mLastMessage.setTypeface(null, Typeface.BOLD); } } - } + //} long muted_till = conversation.getLongAttribute(Conversation.ATTRIBUTE_MUTED_TILL, 0); if (muted_till == Long.MAX_VALUE) { |