mirror of
https://github.com/M66B/FairEmail.git
synced 2026-04-02 15:17:03 +02:00
The dot
This commit is contained in:
@@ -64,6 +64,7 @@ public class AdapterNavFolder extends RecyclerView.Adapter<AdapterNavFolder.View
|
||||
public class ViewHolder extends RecyclerView.ViewHolder implements View.OnClickListener {
|
||||
private View view;
|
||||
private ImageView ivItem;
|
||||
private ImageView ivBadge;
|
||||
private TextView tvItem;
|
||||
private TextView tvItemExtra;
|
||||
private ImageView ivExtra;
|
||||
@@ -74,6 +75,7 @@ public class AdapterNavFolder extends RecyclerView.Adapter<AdapterNavFolder.View
|
||||
|
||||
view = itemView.findViewById(R.id.clItem);
|
||||
ivItem = itemView.findViewById(R.id.ivItem);
|
||||
ivBadge = itemView.findViewById(R.id.ivBadge);
|
||||
tvItem = itemView.findViewById(R.id.tvItem);
|
||||
tvItemExtra = itemView.findViewById(R.id.tvItemExtra);
|
||||
ivExtra = itemView.findViewById(R.id.ivExtra);
|
||||
@@ -121,6 +123,8 @@ public class AdapterNavFolder extends RecyclerView.Adapter<AdapterNavFolder.View
|
||||
else
|
||||
count = folder.unseen;
|
||||
|
||||
ivBadge.setVisibility(count == 0 || expanded ? View.GONE : View.VISIBLE);
|
||||
|
||||
if (count == 0)
|
||||
tvItem.setText(folder.getDisplayName(context));
|
||||
else
|
||||
@@ -169,6 +173,7 @@ public class AdapterNavFolder extends RecyclerView.Adapter<AdapterNavFolder.View
|
||||
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.colorWarning = Helper.resolveColor(context, R.attr.colorWarning);
|
||||
|
||||
this.TF = Helper.getTimeInstance(context, SimpleDateFormat.SHORT);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user