mirror of
https://github.com/M66B/FairEmail.git
synced 2025-12-31 10:01:22 +01:00
Highlight unread messages
This commit is contained in:
@@ -245,14 +245,19 @@ public class AdapterMessage extends RecyclerView.Adapter<AdapterMessage.ViewHold
|
||||
} else
|
||||
holder.tvCount.setText(Helper.localizeFolderName(context, message.folderName));
|
||||
|
||||
holder.ivAttachments.setVisibility(message.attachments > 0 ? View.VISIBLE : View.GONE);
|
||||
|
||||
boolean unseen = (message.thread == null ? message.unseen > 0 : !message.seen);
|
||||
|
||||
int visibility = (unseen ? Typeface.BOLD : Typeface.NORMAL);
|
||||
holder.tvFrom.setTypeface(null, visibility);
|
||||
holder.tvTime.setTypeface(null, visibility);
|
||||
holder.ivAttachments.setVisibility(message.attachments > 0 ? View.VISIBLE : View.GONE);
|
||||
holder.tvSubject.setTypeface(null, visibility);
|
||||
holder.tvCount.setTypeface(null, visibility);
|
||||
|
||||
holder.tvFrom.setTextColor(Helper.resolveColor(context, unseen ? R.attr.colorUnread : android.R.attr.textColorSecondary));
|
||||
holder.tvTime.setTextColor(Helper.resolveColor(context, unseen ? R.attr.colorUnread : android.R.attr.textColorSecondary));
|
||||
|
||||
holder.wire();
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user