|
|
|
@ -74,6 +74,7 @@ public class AdapterAccount extends RecyclerView.Adapter<AdapterAccount.ViewHold
|
|
|
|
|
private LifecycleOwner owner;
|
|
|
|
|
private LayoutInflater inflater;
|
|
|
|
|
|
|
|
|
|
private int colorWarning;
|
|
|
|
|
private int colorUnread;
|
|
|
|
|
private int textColorSecondary;
|
|
|
|
|
private boolean debug;
|
|
|
|
@ -165,9 +166,11 @@ public class AdapterAccount extends RecyclerView.Adapter<AdapterAccount.ViewHold
|
|
|
|
|
ivPrimary.setVisibility(account.primary ? View.VISIBLE : View.GONE);
|
|
|
|
|
ivNotify.setVisibility(account.notify ? View.VISIBLE : View.GONE);
|
|
|
|
|
|
|
|
|
|
if (settings)
|
|
|
|
|
if (settings) {
|
|
|
|
|
tvName.setText(account.name);
|
|
|
|
|
else {
|
|
|
|
|
tvName.setTextColor(account.protocol == EntityAccount.TYPE_IMAP
|
|
|
|
|
? textColorSecondary : colorWarning);
|
|
|
|
|
} else {
|
|
|
|
|
if (account.unseen > 0)
|
|
|
|
|
tvName.setText(context.getString(R.string.title_name_count, account.name, NF.format(account.unseen)));
|
|
|
|
|
else
|
|
|
|
@ -499,6 +502,7 @@ public class AdapterAccount extends RecyclerView.Adapter<AdapterAccount.ViewHold
|
|
|
|
|
|
|
|
|
|
SharedPreferences prefs = PreferenceManager.getDefaultSharedPreferences(context);
|
|
|
|
|
boolean highlight_unread = prefs.getBoolean("highlight_unread", true);
|
|
|
|
|
this.colorWarning = Helper.resolveColor(context, R.attr.colorWarning);
|
|
|
|
|
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);
|
|
|
|
|