mirror of
https://github.com/M66B/FairEmail.git
synced 2026-04-04 16:16:33 +02:00
Default enable highlight unread for new installations
This commit is contained in:
@@ -341,7 +341,7 @@ public class AdapterAccount extends RecyclerView.Adapter<AdapterAccount.ViewHold
|
||||
this.inflater = LayoutInflater.from(context);
|
||||
|
||||
SharedPreferences prefs = PreferenceManager.getDefaultSharedPreferences(context);
|
||||
boolean highlight_unread = prefs.getBoolean("highlight_unread", false);
|
||||
boolean highlight_unread = prefs.getBoolean("highlight_unread", true);
|
||||
this.colorUnread = Helper.resolveColor(context, highlight_unread ? R.attr.colorUnreadHighlight : android.R.attr.textColorPrimary);
|
||||
this.textColorSecondary = Helper.resolveColor(context, android.R.attr.textColorSecondary);
|
||||
|
||||
|
||||
@@ -747,7 +747,7 @@ public class AdapterFolder extends RecyclerView.Adapter<AdapterFolder.ViewHolder
|
||||
this.textColorPrimary = Helper.resolveColor(context, android.R.attr.textColorPrimary);
|
||||
this.textColorSecondary = Helper.resolveColor(context, android.R.attr.textColorSecondary);
|
||||
|
||||
boolean highlight_unread = prefs.getBoolean("highlight_unread", false);
|
||||
boolean highlight_unread = prefs.getBoolean("highlight_unread", true);
|
||||
this.colorUnread = Helper.resolveColor(context, highlight_unread ? R.attr.colorUnreadHighlight : android.R.attr.textColorPrimary);
|
||||
|
||||
setHasStableIds(true);
|
||||
|
||||
@@ -4206,7 +4206,7 @@ public class AdapterMessage extends RecyclerView.Adapter<AdapterMessage.ViewHold
|
||||
this.textColorPrimary = Helper.resolveColor(context, android.R.attr.textColorPrimary);
|
||||
this.textColorSecondary = Helper.resolveColor(context, android.R.attr.textColorSecondary);
|
||||
|
||||
boolean highlight_unread = prefs.getBoolean("highlight_unread", false);
|
||||
boolean highlight_unread = prefs.getBoolean("highlight_unread", true);
|
||||
|
||||
this.colorUnread = Helper.resolveColor(context, highlight_unread ? R.attr.colorUnreadHighlight : R.attr.colorUnread);
|
||||
this.colorRead = Helper.resolveColor(context, R.attr.colorRead);
|
||||
|
||||
@@ -178,7 +178,7 @@ public class AdapterNavAccount extends RecyclerView.Adapter<AdapterNavAccount.Vi
|
||||
this.inflater = LayoutInflater.from(context);
|
||||
|
||||
SharedPreferences prefs = PreferenceManager.getDefaultSharedPreferences(context);
|
||||
boolean highlight_unread = prefs.getBoolean("highlight_unread", false);
|
||||
boolean highlight_unread = prefs.getBoolean("highlight_unread", true);
|
||||
this.colorUnread = Helper.resolveColor(context, highlight_unread ? R.attr.colorUnreadHighlight : android.R.attr.textColorPrimary);
|
||||
this.textColorSecondary = Helper.resolveColor(context, android.R.attr.textColorSecondary);
|
||||
|
||||
|
||||
@@ -160,7 +160,7 @@ public class AdapterNavFolder extends RecyclerView.Adapter<AdapterNavFolder.View
|
||||
this.inflater = LayoutInflater.from(context);
|
||||
|
||||
SharedPreferences prefs = PreferenceManager.getDefaultSharedPreferences(context);
|
||||
boolean highlight_unread = prefs.getBoolean("highlight_unread", false);
|
||||
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);
|
||||
this.textColorSecondary = Helper.resolveColor(context, android.R.attr.textColorSecondary);
|
||||
|
||||
@@ -126,7 +126,7 @@ public class AdapterNavMenu extends RecyclerView.Adapter<AdapterNavMenu.ViewHold
|
||||
this.inflater = LayoutInflater.from(context);
|
||||
|
||||
SharedPreferences prefs = PreferenceManager.getDefaultSharedPreferences(context);
|
||||
boolean highlight_unread = prefs.getBoolean("highlight_unread", false);
|
||||
boolean highlight_unread = prefs.getBoolean("highlight_unread", true);
|
||||
this.colorUnread = Helper.resolveColor(context, highlight_unread ? R.attr.colorUnreadHighlight : android.R.attr.textColorPrimary);
|
||||
this.textColorSecondary = Helper.resolveColor(context, android.R.attr.textColorSecondary);
|
||||
|
||||
|
||||
@@ -131,7 +131,7 @@ public class AdapterNavUnified extends RecyclerView.Adapter<AdapterNavUnified.Vi
|
||||
this.inflater = LayoutInflater.from(context);
|
||||
|
||||
SharedPreferences prefs = PreferenceManager.getDefaultSharedPreferences(context);
|
||||
boolean highlight_unread = prefs.getBoolean("highlight_unread", false);
|
||||
boolean highlight_unread = prefs.getBoolean("highlight_unread", true);
|
||||
this.colorUnread = Helper.resolveColor(context, highlight_unread ? R.attr.colorUnreadHighlight : android.R.attr.textColorPrimary);
|
||||
this.textColorSecondary = Helper.resolveColor(context, android.R.attr.textColorSecondary);
|
||||
}
|
||||
|
||||
@@ -247,6 +247,10 @@ public class ApplicationEx extends Application {
|
||||
if (!prefs.contains("poll_interval"))
|
||||
editor.putInt("poll_interval", 0);
|
||||
editor.remove("first");
|
||||
} else if (version < 1021) {
|
||||
boolean highlight_unread = prefs.getBoolean("highlight_unread", false);
|
||||
if (!highlight_unread)
|
||||
prefs.edit().putBoolean("highlight_unread", highlight_unread);
|
||||
}
|
||||
|
||||
if (BuildConfig.DEBUG && false) {
|
||||
|
||||
@@ -659,7 +659,7 @@ public class FragmentOptionsDisplay extends FragmentBase implements SharedPrefer
|
||||
swIndentation.setEnabled(swCards.isChecked());
|
||||
swActionbar.setChecked(prefs.getBoolean("actionbar", true));
|
||||
|
||||
swHighlightUnread.setChecked(prefs.getBoolean("highlight_unread", false));
|
||||
swHighlightUnread.setChecked(prefs.getBoolean("highlight_unread", true));
|
||||
swColorStripe.setChecked(prefs.getBoolean("color_stripe", true));
|
||||
swAvatars.setChecked(prefs.getBoolean("avatars", true));
|
||||
swGravatars.setChecked(prefs.getBoolean("gravatars", false));
|
||||
|
||||
Reference in New Issue
Block a user