mirror of
https://github.com/M66B/FairEmail.git
synced 2026-01-04 03:43:55 +01:00
Override all highlight unread colors
This commit is contained in:
@@ -435,7 +435,8 @@ public class AdapterAccount extends RecyclerView.Adapter<AdapterAccount.ViewHold
|
|||||||
|
|
||||||
SharedPreferences prefs = PreferenceManager.getDefaultSharedPreferences(context);
|
SharedPreferences prefs = PreferenceManager.getDefaultSharedPreferences(context);
|
||||||
boolean highlight_unread = prefs.getBoolean("highlight_unread", true);
|
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.textColorSecondary = Helper.resolveColor(context, android.R.attr.textColorSecondary);
|
||||||
|
|
||||||
this.DTF = Helper.getDateTimeInstance(context, DateFormat.SHORT, DateFormat.SHORT);
|
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);
|
this.textColorSecondary = Helper.resolveColor(context, android.R.attr.textColorSecondary);
|
||||||
|
|
||||||
boolean highlight_unread = prefs.getBoolean("highlight_unread", true);
|
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);
|
setHasStableIds(true);
|
||||||
|
|
||||||
|
|||||||
@@ -181,7 +181,8 @@ public class AdapterNavAccount extends RecyclerView.Adapter<AdapterNavAccount.Vi
|
|||||||
|
|
||||||
SharedPreferences prefs = PreferenceManager.getDefaultSharedPreferences(context);
|
SharedPreferences prefs = PreferenceManager.getDefaultSharedPreferences(context);
|
||||||
boolean highlight_unread = prefs.getBoolean("highlight_unread", true);
|
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.textColorSecondary = Helper.resolveColor(context, android.R.attr.textColorSecondary);
|
||||||
|
|
||||||
this.DTF = Helper.getTimeInstance(context, SimpleDateFormat.SHORT);
|
this.DTF = Helper.getTimeInstance(context, SimpleDateFormat.SHORT);
|
||||||
|
|||||||
@@ -161,7 +161,8 @@ public class AdapterNavFolder extends RecyclerView.Adapter<AdapterNavFolder.View
|
|||||||
SharedPreferences prefs = PreferenceManager.getDefaultSharedPreferences(context);
|
SharedPreferences prefs = PreferenceManager.getDefaultSharedPreferences(context);
|
||||||
boolean highlight_unread = prefs.getBoolean("highlight_unread", true);
|
boolean highlight_unread = prefs.getBoolean("highlight_unread", true);
|
||||||
this.debug = prefs.getBoolean("debug", false);
|
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.textColorSecondary = Helper.resolveColor(context, android.R.attr.textColorSecondary);
|
||||||
|
|
||||||
this.DTF = Helper.getTimeInstance(context, SimpleDateFormat.SHORT);
|
this.DTF = Helper.getTimeInstance(context, SimpleDateFormat.SHORT);
|
||||||
|
|||||||
@@ -127,7 +127,8 @@ public class AdapterNavMenu extends RecyclerView.Adapter<AdapterNavMenu.ViewHold
|
|||||||
|
|
||||||
SharedPreferences prefs = PreferenceManager.getDefaultSharedPreferences(context);
|
SharedPreferences prefs = PreferenceManager.getDefaultSharedPreferences(context);
|
||||||
boolean highlight_unread = prefs.getBoolean("highlight_unread", true);
|
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.textColorSecondary = Helper.resolveColor(context, android.R.attr.textColorSecondary);
|
||||||
|
|
||||||
setHasStableIds(true);
|
setHasStableIds(true);
|
||||||
|
|||||||
@@ -132,7 +132,8 @@ public class AdapterNavUnified extends RecyclerView.Adapter<AdapterNavUnified.Vi
|
|||||||
|
|
||||||
SharedPreferences prefs = PreferenceManager.getDefaultSharedPreferences(context);
|
SharedPreferences prefs = PreferenceManager.getDefaultSharedPreferences(context);
|
||||||
boolean highlight_unread = prefs.getBoolean("highlight_unread", true);
|
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.textColorSecondary = Helper.resolveColor(context, android.R.attr.textColorSecondary);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user