aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDaniel Gultsch <daniel@gultsch.de>2017-11-20 11:12:11 +0100
committerDaniel Gultsch <daniel@gultsch.de>2017-11-20 11:12:11 +0100
commit1780a4257fcb2ed25073b3a3c816c608a9ec4656 (patch)
tree7390f0ac4955c3ce77c2d08343edeb981a77181c
parentff0e2ff8e4a2ba0f4787486dcd793411a841e545 (diff)
ConversationsAdapter: code cleanup
-rw-r--r--src/main/java/eu/siacs/conversations/ui/adapter/ConversationAdapter.java18
1 files changed, 9 insertions, 9 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 94adce7..6cc5727 100644
--- a/src/main/java/eu/siacs/conversations/ui/adapter/ConversationAdapter.java
+++ b/src/main/java/eu/siacs/conversations/ui/adapter/ConversationAdapter.java
@@ -84,19 +84,19 @@ public class ConversationAdapter extends ArrayAdapter<Conversation> {
|| message.getTransferable().getStatus() != Transferable.STATUS_DELETED)) {
mSenderName.setVisibility(View.GONE);
mLastMessage.setVisibility(View.GONE);
- mLastMessageImage.setVisibility(View.GONE);
+ mLastMessageImage.setVisibility(View.GONE);
imagePreview.setVisibility(View.VISIBLE);
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;