Added option for counts / pinned nav menu

This commit is contained in:
M66B
2022-03-07 07:53:37 +01:00
parent a6c0073c8d
commit df874106ad
7 changed files with 37 additions and 7 deletions

View File

@@ -49,6 +49,7 @@ public class AdapterNavUnified extends RecyclerView.Adapter<AdapterNavUnified.Vi
private LayoutInflater inflater;
private boolean nav_count;
private boolean nav_count_pinned;
private boolean nav_unseen_drafts;
private int colorUnread;
private int textColorSecondary;
@@ -115,7 +116,7 @@ public class AdapterNavUnified extends RecyclerView.Adapter<AdapterNavUnified.Vi
ivBadge.setVisibility(count == 0 || expanded ? View.GONE : View.VISIBLE);
tvCount.setText(Helper.formatNumber(count, 99, NF));
tvCount.setVisibility(count == 0 || expanded || !nav_count ? View.GONE : View.VISIBLE);
tvCount.setVisibility(count == 0 || expanded || !nav_count_pinned ? View.GONE : View.VISIBLE);
if (count == 0)
tvItem.setText(EntityFolder.localizeType(context, folder.type));
@@ -161,6 +162,7 @@ public class AdapterNavUnified extends RecyclerView.Adapter<AdapterNavUnified.Vi
SharedPreferences prefs = PreferenceManager.getDefaultSharedPreferences(context);
this.nav_count = prefs.getBoolean("nav_count", false);
this.nav_count_pinned = prefs.getBoolean("nav_count_pinned", false);
this.nav_unseen_drafts = prefs.getBoolean("nav_unseen_drafts", false);
boolean highlight_unread = prefs.getBoolean("highlight_unread", true);
int colorHighlight = prefs.getInt("highlight_color", Helper.resolveColor(context, R.attr.colorUnreadHighlight));