aboutsummaryrefslogtreecommitdiffstats
path: root/src/main/java/de/pixart
diff options
context:
space:
mode:
authorChristian Schneppe <christian@pix-art.de>2017-11-22 19:30:25 +0100
committerChristian Schneppe <christian@pix-art.de>2017-11-22 19:30:25 +0100
commitacdb88839648405e0498d7774bcdc9f422ebc5c2 (patch)
treeb9dbd0cdcc276b7714ab6ab7541b7ed0865115e8 /src/main/java/de/pixart
parent822bfe40481803b2dbe6f874788afbe0c9380145 (diff)
ConversationsAdapter: code cleanup
Diffstat (limited to '')
-rw-r--r--src/main/java/de/pixart/messenger/ui/adapter/ConversationAdapter.java15
1 files changed, 8 insertions, 7 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 75053740f..89a1f5ff1 100644
--- a/src/main/java/de/pixart/messenger/ui/adapter/ConversationAdapter.java
+++ b/src/main/java/de/pixart/messenger/ui/adapter/ConversationAdapter.java
@@ -132,13 +132,14 @@ public class ConversationAdapter extends ArrayAdapter<Conversation> {
activity.loadBitmap(message, imagePreview);
} else {
final boolean showPreviewText;
- if (message.getFileParams().runtime > 0) {
- showPreviewText = false;
- mLastMessageImage.setImageResource(activity.getThemeResource(R.attr.ic_attach_record, R.drawable.ic_attach_record));
- mLastMessageImage.setVisibility(View.VISIBLE);
- } else if (message.getType() == Message.TYPE_FILE) {
- showPreviewText = true;
- mLastMessageImage.setImageResource(activity.getThemeResource(R.attr.ic_attach_document, R.drawable.ic_attach_document));
+ if (message.getType() == Message.TYPE_FILE) {
+ if (message.getFileParams().runtime > 0) {
+ showPreviewText = false;
+ mLastMessageImage.setImageResource(activity.getThemeResource(R.attr.ic_attach_record, R.drawable.ic_attach_record));
+ } else {
+ showPreviewText = true;
+ mLastMessageImage.setImageResource(activity.getThemeResource(R.attr.ic_attach_document, R.drawable.ic_attach_document));
+ }
mLastMessageImage.setVisibility(View.VISIBLE);
} else if (message.isGeoUri()) {
showPreviewText = false;