Override all highlight unread colors

pull/187/head
M66B 4 years ago
parent b3097af50a
commit 8c0e64ff79

@ -435,7 +435,8 @@ public class AdapterAccount extends RecyclerView.Adapter<AdapterAccount.ViewHold
SharedPreferences prefs = PreferenceManager.getDefaultSharedPreferences(context);
boolean highlight_unread = prefs.getBoolean("highlight_unread", true);
this.colorUnread = Helper.resolveColor(context, highlight_unread ? R.attr.colorUnreadHighlight : android.R.attr.textColorPrimary);
int colorHighlight = prefs.getInt("highlight_color", Helper.resolveColor(context, R.attr.colorUnreadHighlight));
this.colorUnread = (highlight_unread ? colorHighlight : Helper.resolveColor(context, R.attr.colorUnread));
this.textColorSecondary = Helper.resolveColor(context, android.R.attr.textColorSecondary);
this.DTF = Helper.getDateTimeInstance(context, DateFormat.SHORT, DateFormat.SHORT);

@ -830,7 +830,8 @@ public class AdapterFolder extends RecyclerView.Adapter<AdapterFolder.ViewHolder
this.textColorSecondary = Helper.resolveColor(context, android.R.attr.textColorSecondary);
boolean highlight_unread = prefs.getBoolean("highlight_unread", true);
this.colorUnread = Helper.resolveColor(context, highlight_unread ? R.attr.colorUnreadHighlight : android.R.attr.textColorPrimary);
int colorHighlight = prefs.getInt("highlight_color", Helper.resolveColor(context, R.attr.colorUnreadHighlight));
this.colorUnread = (highlight_unread ? colorHighlight : Helper.resolveColor(context, R.attr.colorUnread));
setHasStableIds(true);

@ -181,7 +181,8 @@ public class AdapterNavAccount extends RecyclerView.Adapter<AdapterNavAccount.Vi
SharedPreferences prefs = PreferenceManager.getDefaultSharedPreferences(context);
boolean highlight_unread = prefs.getBoolean("highlight_unread", true);
this.colorUnread = Helper.resolveColor(context, highlight_unread ? R.attr.colorUnreadHighlight : android.R.attr.textColorPrimary);
int colorHighlight = prefs.getInt("highlight_color", Helper.resolveColor(context, R.attr.colorUnreadHighlight));
this.colorUnread = (highlight_unread ? colorHighlight : Helper.resolveColor(context, R.attr.colorUnread));
this.textColorSecondary = Helper.resolveColor(context, android.R.attr.textColorSecondary);
this.DTF = Helper.getTimeInstance(context, SimpleDateFormat.SHORT);

@ -161,7 +161,8 @@ public class AdapterNavFolder extends RecyclerView.Adapter<AdapterNavFolder.View
SharedPreferences prefs = PreferenceManager.getDefaultSharedPreferences(context);
boolean highlight_unread = prefs.getBoolean("highlight_unread", true);
this.debug = prefs.getBoolean("debug", false);
this.colorUnread = Helper.resolveColor(context, highlight_unread ? R.attr.colorUnreadHighlight : android.R.attr.textColorPrimary);
int colorHighlight = prefs.getInt("highlight_color", Helper.resolveColor(context, R.attr.colorUnreadHighlight));
this.colorUnread = (highlight_unread ? colorHighlight : Helper.resolveColor(context, R.attr.colorUnread));
this.textColorSecondary = Helper.resolveColor(context, android.R.attr.textColorSecondary);
this.DTF = Helper.getTimeInstance(context, SimpleDateFormat.SHORT);

@ -127,7 +127,8 @@ public class AdapterNavMenu extends RecyclerView.Adapter<AdapterNavMenu.ViewHold
SharedPreferences prefs = PreferenceManager.getDefaultSharedPreferences(context);
boolean highlight_unread = prefs.getBoolean("highlight_unread", true);
this.colorUnread = Helper.resolveColor(context, highlight_unread ? R.attr.colorUnreadHighlight : android.R.attr.textColorPrimary);
int colorHighlight = prefs.getInt("highlight_color", Helper.resolveColor(context, R.attr.colorUnreadHighlight));
this.colorUnread = (highlight_unread ? colorHighlight : Helper.resolveColor(context, R.attr.colorUnread));
this.textColorSecondary = Helper.resolveColor(context, android.R.attr.textColorSecondary);
setHasStableIds(true);

@ -132,7 +132,8 @@ public class AdapterNavUnified extends RecyclerView.Adapter<AdapterNavUnified.Vi
SharedPreferences prefs = PreferenceManager.getDefaultSharedPreferences(context);
boolean highlight_unread = prefs.getBoolean("highlight_unread", true);
this.colorUnread = Helper.resolveColor(context, highlight_unread ? R.attr.colorUnreadHighlight : android.R.attr.textColorPrimary);
int colorHighlight = prefs.getInt("highlight_color", Helper.resolveColor(context, R.attr.colorUnreadHighlight));
this.colorUnread = (highlight_unread ? colorHighlight : Helper.resolveColor(context, R.attr.colorUnread));
this.textColorSecondary = Helper.resolveColor(context, android.R.attr.textColorSecondary);
}

Loading…
Cancel
Save