From 174a62536e4ed5ae02dc729ddd64fb6130e30c81 Mon Sep 17 00:00:00 2001 From: Jesse Vincent Date: Tue, 30 Nov 2010 01:04:24 +0000 Subject: [PATCH] Resolves Issue 2719: Message List Previews: Read message senders are shown in bold patch from achen.code --- src/com/fsck/k9/activity/MessageList.java | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/src/com/fsck/k9/activity/MessageList.java b/src/com/fsck/k9/activity/MessageList.java index 1d782fb96..26305b16a 100644 --- a/src/com/fsck/k9/activity/MessageList.java +++ b/src/com/fsck/k9/activity/MessageList.java @@ -2762,6 +2762,7 @@ public class MessageList holder.subject.setText(message.message.getSubject()); } + int senderTypeface = message.read ? Typeface.NORMAL : Typeface.BOLD; if (holder.preview != null) { /* @@ -2777,7 +2778,7 @@ public class MessageList Spannable str = (Spannable)holder.preview.getText(); // Create our span sections, and assign a format to each. - str.setSpan(new StyleSpan(Typeface.BOLD), + str.setSpan(new StyleSpan(senderTypeface), 0, (message.sender.length()+1), Spannable.SPAN_EXCLUSIVE_EXCLUSIVE @@ -2792,7 +2793,7 @@ public class MessageList { holder.from.setText(new SpannableStringBuilder(recipientSigil(message)).append( message.sender)); - holder.from.setTypeface(null, message.read ? Typeface.NORMAL : Typeface.BOLD); + holder.from.setTypeface(null, senderTypeface); } holder.date.setText(message.getDate(mMessageHelper));