Added option to highlight subject

This commit is contained in:
M66B
2020-03-22 18:43:22 +01:00
parent 7c6bdfac73
commit d0e366a336
5 changed files with 56 additions and 30 deletions

View File

@@ -210,6 +210,7 @@ public class AdapterMessage extends RecyclerView.Adapter<AdapterMessage.ViewHold
private int textColorSecondary;
private int colorUnread;
private int colorRead;
private int colorSubject;
private int colorSeparator;
private boolean hasWebView;
@@ -493,7 +494,7 @@ public class AdapterMessage extends RecyclerView.Adapter<AdapterMessage.ViewHold
ibHelp = itemView.findViewById(R.id.ibHelp);
if (tvSubject != null) {
tvSubject.setTextColor(colorRead);
tvSubject.setTextColor(colorSubject);
if (compact)
if ("start".equals(subject_ellipsize))
@@ -4429,9 +4430,11 @@ public class AdapterMessage extends RecyclerView.Adapter<AdapterMessage.ViewHold
this.textColorSecondary = Helper.resolveColor(context, android.R.attr.textColorSecondary);
boolean highlight_unread = prefs.getBoolean("highlight_unread", true);
boolean highlight_subject = prefs.getBoolean("highlight_subject", false);
this.colorUnread = Helper.resolveColor(context, highlight_unread ? R.attr.colorUnreadHighlight : R.attr.colorUnread);
this.colorRead = Helper.resolveColor(context, R.attr.colorRead);
this.colorSubject = Helper.resolveColor(context, highlight_subject ? R.attr.colorUnreadHighlight : R.attr.colorRead);
this.colorSeparator = Helper.resolveColor(context, R.attr.colorSeparator);