diff --git a/app/src/main/java/eu/faircode/email/AdapterAccount.java b/app/src/main/java/eu/faircode/email/AdapterAccount.java index e1bd1138fe..9eb09f58d6 100644 --- a/app/src/main/java/eu/faircode/email/AdapterAccount.java +++ b/app/src/main/java/eu/faircode/email/AdapterAccount.java @@ -73,6 +73,14 @@ public class AdapterAccount extends RecyclerView.Adapter 0 ? Typeface.BOLD : Typeface.NORMAL); + tvName.setTextColor(Helper.resolveColor(context, folder.unseen > 0 ? R.attr.colorUnread : android.R.attr.textColorSecondary)); + + tvAfter.setText(Integer.toString(folder.after)); + tvAfter.setVisibility(folder.synchronize ? View.VISIBLE : View.INVISIBLE); + + ivSync.setVisibility(folder.synchronize ? View.VISIBLE : View.INVISIBLE); + + tvAccount.setText(folder.accountName); + tvAccount.setVisibility(EntityFolder.TYPE_OUTBOX.equals(folder.type) ? View.GONE : View.VISIBLE); + + int resid = context.getResources().getIdentifier( + "title_folder_" + folder.type.toLowerCase(), + "string", + context.getPackageName()); + tvType.setText(resid > 0 ? context.getString(resid) : folder.type); + } + @Override public void onClick(View view) { int pos = getAdapterPosition(); @@ -225,25 +246,8 @@ public class AdapterFolder extends RecyclerView.Adapter 0 ? Typeface.BOLD : Typeface.NORMAL); - holder.tvName.setTextColor(Helper.resolveColor(context, folder.unseen > 0 ? R.attr.colorUnread : android.R.attr.textColorSecondary)); - - holder.tvAfter.setText(Integer.toString(folder.after)); - holder.tvAfter.setVisibility(folder.synchronize ? View.VISIBLE : View.INVISIBLE); - - holder.ivSync.setVisibility(folder.synchronize ? View.VISIBLE : View.INVISIBLE); - - holder.tvAccount.setText(folder.accountName); - holder.tvAccount.setVisibility(EntityFolder.TYPE_OUTBOX.equals(folder.type) ? View.GONE : View.VISIBLE); - - int resid = context.getResources().getIdentifier( - "title_folder_" + folder.type.toLowerCase(), - "string", - context.getPackageName()); - holder.tvType.setText(resid > 0 ? context.getString(resid) : folder.type); holder.wire(); } diff --git a/app/src/main/java/eu/faircode/email/AdapterIdentity.java b/app/src/main/java/eu/faircode/email/AdapterIdentity.java index 6f645a4111..8c84305e73 100644 --- a/app/src/main/java/eu/faircode/email/AdapterIdentity.java +++ b/app/src/main/java/eu/faircode/email/AdapterIdentity.java @@ -73,6 +73,14 @@ public class AdapterIdentity extends RecyclerView.Adapter