Attach seen/unseen content description to color stripe

This commit is contained in:
M66B 2019-12-22 20:01:19 +01:00
parent b370ea9e5c
commit 9c1c46f7ca
1 changed files with 3 additions and 3 deletions

View File

@ -772,12 +772,14 @@ public class AdapterMessage extends RecyclerView.Adapter<AdapterMessage.ViewHold
int colorBackground =
(message.accountColor == null || !ActivityBilling.isPro(context)
? colorSeparator : message.accountColor);
vwColor.setVisibility(View.VISIBLE);
if (vwColor.getTag() == null || (int) vwColor.getTag() != colorBackground) {
vwColor.setTag(colorBackground);
vwColor.setBackgroundColor(colorBackground);
}
vwColor.setContentDescription(context.getString(
message.unseen > 0 ? R.string.title_accessibility_unseen : R.string.title_accessibility_seen));
// Expander
if (ibExpander.getTag() == null || (boolean) ibExpander.getTag() != expanded) {
ibExpander.setTag(expanded);
@ -801,8 +803,6 @@ public class AdapterMessage extends RecyclerView.Adapter<AdapterMessage.ViewHold
ivEncrypted.setVisibility(message.encrypted > 0 ? View.VISIBLE : View.GONE);
tvFrom.setText(MessageHelper.formatAddresses(addresses, name_email, false));
tvFrom.setPaintFlags(tvFrom.getPaintFlags() & ~Paint.UNDERLINE_TEXT_FLAG);
//tvFrom.setContentDescription(context.getString(
// message.unseen > 0 ? R.string.title_accessibility_unseen : R.string.title_accessibility_seen));
tvSize.setText(message.totalSize == null ? null : Helper.humanReadableByteCount(message.totalSize, true));
tvSize.setVisibility(message.totalSize != null && "size".equals(sort) ? View.VISIBLE : View.GONE);
tvTime.setText(date && "time".equals(sort)