From 74a991e4e4ad87e79b91d45760b8368ea2fa9004 Mon Sep 17 00:00:00 2001 From: M66B Date: Tue, 4 Dec 2018 17:08:36 +0100 Subject: [PATCH] Star from message item --- .../eu/faircode/email/AdapterMessage.java | 33 ++++++++++++++----- .../main/res/layout/item_message_compact.xml | 33 +++++++++---------- .../main/res/layout/item_message_normal.xml | 33 +++++++++---------- 3 files changed, 56 insertions(+), 43 deletions(-) diff --git a/app/src/main/java/eu/faircode/email/AdapterMessage.java b/app/src/main/java/eu/faircode/email/AdapterMessage.java index a14a9062d4..917900554e 100644 --- a/app/src/main/java/eu/faircode/email/AdapterMessage.java +++ b/app/src/main/java/eu/faircode/email/AdapterMessage.java @@ -254,6 +254,7 @@ public class AdapterMessage extends RecyclerView.Adapter 0 ? View.VISIBLE : View.GONE); + ivFlagged.setImageResource(message.count - message.unflagged > 0 + ? R.drawable.baseline_star_24 : R.drawable.baseline_star_border_24); + ivFlagged.setVisibility(View.VISIBLE); tvFrom.setText(MessageHelper.getFormattedAddresses(outgoing ? message.to : message.from, !compact)); tvSize.setText(message.size == null ? null : Helper.humanReadableByteCount(message.size, true)); @@ -551,7 +556,9 @@ public class AdapterMessage extends RecyclerView.Adapter - - + + - - + +