mirror of
https://github.com/M66B/FairEmail.git
synced 2026-04-08 01:53:25 +02:00
Unread color
This commit is contained in:
@@ -78,7 +78,7 @@ public class AdapterFolder extends RecyclerView.Adapter<AdapterFolder.ViewHolder
|
||||
|
||||
private int dp12;
|
||||
private float textSize;
|
||||
private int colorUnread;
|
||||
private int textColorPrimary;
|
||||
private int textColorSecondary;
|
||||
|
||||
private List<Long> disabledIds = new ArrayList<>();
|
||||
@@ -228,7 +228,7 @@ public class AdapterFolder extends RecyclerView.Adapter<AdapterFolder.ViewHolder
|
||||
tvName.setText(folder.getDisplayName(context, folder.parent_ref == null ? null : folder.parent_ref));
|
||||
|
||||
tvName.setTypeface(folder.unseen > 0 ? Typeface.DEFAULT_BOLD : Typeface.DEFAULT);
|
||||
tvName.setTextColor(folder.unseen > 0 ? colorUnread : textColorSecondary);
|
||||
tvName.setTextColor(folder.unseen > 0 ? textColorPrimary : textColorSecondary);
|
||||
|
||||
if (listener == null && folder.selectable) {
|
||||
StringBuilder sb = new StringBuilder();
|
||||
@@ -275,7 +275,7 @@ public class AdapterFolder extends RecyclerView.Adapter<AdapterFolder.ViewHolder
|
||||
}
|
||||
ivSync.setImageTintList(ColorStateList.valueOf(
|
||||
folder.synchronize && folder.initialize != 0 && !EntityFolder.OUTBOX.equals(folder.type)
|
||||
? colorUnread : textColorSecondary));
|
||||
? textColorPrimary : textColorSecondary));
|
||||
|
||||
tvKeywords.setText(TextUtils.join(" ", folder.keywords));
|
||||
tvKeywords.setVisibility(debug && folder.keywords.length > 0 ? View.VISIBLE : View.GONE);
|
||||
@@ -665,7 +665,7 @@ public class AdapterFolder extends RecyclerView.Adapter<AdapterFolder.ViewHolder
|
||||
|
||||
this.dp12 = Helper.dp2pixels(context, 12);
|
||||
this.textSize = Helper.getTextSize(context, zoom);
|
||||
this.colorUnread = Helper.resolveColor(context, R.attr.colorUnread);
|
||||
this.textColorPrimary = Helper.resolveColor(context, android.R.attr.textColorPrimary);
|
||||
this.textColorSecondary = Helper.resolveColor(context, android.R.attr.textColorSecondary);
|
||||
|
||||
setHasStableIds(true);
|
||||
|
||||
@@ -171,7 +171,6 @@ public class AdapterMessage extends RecyclerView.Adapter<AdapterMessage.ViewHold
|
||||
private int dp36;
|
||||
private int colorPrimary;
|
||||
private int colorAccent;
|
||||
private int colorWarning;
|
||||
private int textColorPrimary;
|
||||
private int textColorSecondary;
|
||||
private int colorUnread;
|
||||
@@ -3010,7 +3009,6 @@ public class AdapterMessage extends RecyclerView.Adapter<AdapterMessage.ViewHold
|
||||
this.dp36 = Helper.dp2pixels(context, 36);
|
||||
this.colorPrimary = Helper.resolveColor(context, R.attr.colorPrimary);
|
||||
this.colorAccent = Helper.resolveColor(context, R.attr.colorAccent);
|
||||
this.colorWarning = Helper.resolveColor(context, R.attr.colorWarning);
|
||||
this.textColorPrimary = Helper.resolveColor(context, android.R.attr.textColorPrimary);
|
||||
this.textColorSecondary = Helper.resolveColor(context, android.R.attr.textColorSecondary);
|
||||
this.colorUnread = Helper.resolveColor(context, R.attr.colorUnread);
|
||||
|
||||
@@ -21,6 +21,7 @@ package eu.faircode.email;
|
||||
|
||||
import android.content.Context;
|
||||
import android.content.Intent;
|
||||
import android.graphics.Typeface;
|
||||
import android.view.LayoutInflater;
|
||||
import android.view.View;
|
||||
import android.view.ViewGroup;
|
||||
@@ -96,7 +97,8 @@ public class AdapterNavAccount extends RecyclerView.Adapter<AdapterNavAccount.Vi
|
||||
account.name, NF.format(account.unseen)));
|
||||
|
||||
tvItem.setTextColor(Helper.resolveColor(context,
|
||||
account.unseen == 0 ? android.R.attr.textColorSecondary : R.attr.colorUnread));
|
||||
account.unseen == 0 ? android.R.attr.textColorSecondary : android.R.attr.textColorPrimary));
|
||||
tvItem.setTypeface(account.unseen == 0 ? Typeface.DEFAULT : Typeface.DEFAULT_BOLD);
|
||||
|
||||
tvItemExtra.setText(account.last_connected == null ? null : DTF.format(account.last_connected));
|
||||
|
||||
|
||||
@@ -22,6 +22,7 @@ package eu.faircode.email;
|
||||
import android.content.Context;
|
||||
import android.content.Intent;
|
||||
import android.content.SharedPreferences;
|
||||
import android.graphics.Typeface;
|
||||
import android.view.LayoutInflater;
|
||||
import android.view.View;
|
||||
import android.view.ViewGroup;
|
||||
@@ -118,7 +119,8 @@ public class AdapterNavFolder extends RecyclerView.Adapter<AdapterNavFolder.View
|
||||
folder.getDisplayName(context), NF.format(count)));
|
||||
|
||||
tvItem.setTextColor(Helper.resolveColor(context,
|
||||
count == 0 ? android.R.attr.textColorSecondary : R.attr.colorUnread));
|
||||
count == 0 ? android.R.attr.textColorSecondary : android.R.attr.textColorPrimary));
|
||||
tvItem.setTypeface(count == 0 ? Typeface.DEFAULT : Typeface.DEFAULT_BOLD);
|
||||
|
||||
tvItemExtra.setText(folder.last_sync == null ? null : DTF.format(folder.last_sync));
|
||||
tvItemExtra.setVisibility(debug ? View.VISIBLE : View.GONE);
|
||||
|
||||
@@ -20,6 +20,7 @@ package eu.faircode.email;
|
||||
*/
|
||||
|
||||
import android.content.Context;
|
||||
import android.graphics.Typeface;
|
||||
import android.view.LayoutInflater;
|
||||
import android.view.View;
|
||||
import android.view.ViewGroup;
|
||||
@@ -85,7 +86,8 @@ public class AdapterNavMenu extends RecyclerView.Adapter<AdapterNavMenu.ViewHold
|
||||
context.getString(menu.getTitle()), NF.format(menu.getCount())));
|
||||
|
||||
tvItem.setTextColor(Helper.resolveColor(context,
|
||||
menu.getCount() == null ? android.R.attr.textColorSecondary : R.attr.colorUnread));
|
||||
menu.getCount() == null ? android.R.attr.textColorSecondary : android.R.attr.textColorPrimary));
|
||||
tvItem.setTypeface(menu.getCount() == null ? Typeface.DEFAULT : Typeface.DEFAULT_BOLD);
|
||||
|
||||
tvItemExtra.setVisibility(View.GONE);
|
||||
|
||||
|
||||
@@ -21,6 +21,7 @@ package eu.faircode.email;
|
||||
|
||||
import android.content.Context;
|
||||
import android.content.Intent;
|
||||
import android.graphics.Typeface;
|
||||
import android.view.LayoutInflater;
|
||||
import android.view.View;
|
||||
import android.view.ViewGroup;
|
||||
@@ -86,7 +87,8 @@ public class AdapterNavUnified extends RecyclerView.Adapter<AdapterNavUnified.Vi
|
||||
Helper.localizeFolderType(context, folder.type), NF.format(folder.unseen)));
|
||||
|
||||
tvItem.setTextColor(Helper.resolveColor(context,
|
||||
folder.unseen == 0 ? android.R.attr.textColorSecondary : R.attr.colorUnread));
|
||||
folder.unseen == 0 ? android.R.attr.textColorSecondary : android.R.attr.textColorPrimary));
|
||||
tvItem.setTypeface(folder.unseen == 0 ? Typeface.DEFAULT : Typeface.DEFAULT_BOLD);
|
||||
|
||||
tvItemExtra.setVisibility(View.GONE);
|
||||
ivExternal.setVisibility(View.GONE);
|
||||
|
||||
Reference in New Issue
Block a user