mirror of
https://github.com/M66B/FairEmail.git
synced 2026-03-27 19:35:10 +01:00
Added option for counts / pinned nav menu
This commit is contained in:
@@ -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));
|
||||
|
||||
|
||||
Reference in New Issue
Block a user