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