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

@@ -58,6 +58,8 @@ public class AdapterNavAccountFolder extends RecyclerView.Adapter<AdapterNavAcco
private LayoutInflater inflater;
private boolean nav_count;
private boolean nav_count_pinned;
private int dp6;
private int dp12;
private int colorUnread;
@@ -144,7 +146,7 @@ public class AdapterNavAccountFolder extends RecyclerView.Adapter<AdapterNavAcco
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);
Integer color = (account.folderName == null ? account.color : account.folderColor);
if (color == null || !ActivityBilling.isPro(context))
@@ -270,6 +272,7 @@ public class AdapterNavAccountFolder extends RecyclerView.Adapter<AdapterNavAcco
SharedPreferences prefs = PreferenceManager.getDefaultSharedPreferences(context);
this.nav_count = prefs.getBoolean("nav_count", false);
this.nav_count_pinned = prefs.getBoolean("nav_count_pinned", false);
boolean highlight_unread = prefs.getBoolean("highlight_unread", true);
int colorHighlight = prefs.getInt("highlight_color", Helper.resolveColor(context, R.attr.colorUnreadHighlight));