1
0
mirror of https://github.com/moparisthebest/k-9 synced 2025-01-31 23:30:11 -05:00

Resolves Issue 2719: Message List Previews: Read message senders are shown in bold patch from achen.code

This commit is contained in:
Jesse Vincent 2010-11-30 01:04:24 +00:00
parent f98a2db2ab
commit 174a62536e

View File

@ -2762,6 +2762,7 @@ public class MessageList
holder.subject.setText(message.message.getSubject()); holder.subject.setText(message.message.getSubject());
} }
int senderTypeface = message.read ? Typeface.NORMAL : Typeface.BOLD;
if (holder.preview != null) if (holder.preview != null)
{ {
/* /*
@ -2777,7 +2778,7 @@ public class MessageList
Spannable str = (Spannable)holder.preview.getText(); Spannable str = (Spannable)holder.preview.getText();
// Create our span sections, and assign a format to each. // Create our span sections, and assign a format to each.
str.setSpan(new StyleSpan(Typeface.BOLD), str.setSpan(new StyleSpan(senderTypeface),
0, 0,
(message.sender.length()+1), (message.sender.length()+1),
Spannable.SPAN_EXCLUSIVE_EXCLUSIVE Spannable.SPAN_EXCLUSIVE_EXCLUSIVE
@ -2792,7 +2793,7 @@ public class MessageList
{ {
holder.from.setText(new SpannableStringBuilder(recipientSigil(message)).append( message.sender)); 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)); holder.date.setText(message.getDate(mMessageHelper));