mirror of
https://github.com/M66B/FairEmail.git
synced 2026-04-07 17:43:18 +02:00
Revert "Added option to not shown unread in nav menu"
This reverts commit e0e3f5819d.
This commit is contained in:
@@ -58,7 +58,6 @@ public class AdapterNavAccountFolder extends RecyclerView.Adapter<AdapterNavAcco
|
||||
private boolean nav_last_sync;
|
||||
private boolean nav_count;
|
||||
private boolean nav_count_pinned;
|
||||
private boolean nav_unseen;
|
||||
private boolean nav_unseen_drafts;
|
||||
private boolean nav_categories;
|
||||
private boolean show_unexposed;
|
||||
@@ -140,9 +139,7 @@ public class AdapterNavAccountFolder extends RecyclerView.Adapter<AdapterNavAcco
|
||||
}
|
||||
|
||||
int count;
|
||||
if (!nav_unseen)
|
||||
count = 0;
|
||||
else if ((!nav_unseen_drafts && EntityFolder.DRAFTS.equals(account.folderType)))
|
||||
if ((!nav_unseen_drafts && EntityFolder.DRAFTS.equals(account.folderType)))
|
||||
count = account.messages;
|
||||
else
|
||||
count = account.unseen;
|
||||
@@ -296,7 +293,6 @@ public class AdapterNavAccountFolder extends RecyclerView.Adapter<AdapterNavAcco
|
||||
this.nav_last_sync = prefs.getBoolean("nav_last_sync", true);
|
||||
this.nav_count = prefs.getBoolean("nav_count", false);
|
||||
this.nav_count_pinned = prefs.getBoolean("nav_count_pinned", false);
|
||||
this.nav_unseen = prefs.getBoolean("nav_unseen", true);
|
||||
this.nav_unseen_drafts = prefs.getBoolean("nav_unseen_drafts", false);
|
||||
this.nav_categories = prefs.getBoolean("nav_categories", false);
|
||||
this.show_unexposed = prefs.getBoolean("show_unexposed", false);
|
||||
|
||||
@@ -58,7 +58,6 @@ public class AdapterNavUnified extends RecyclerView.Adapter<AdapterNavUnified.Vi
|
||||
private int dp12;
|
||||
private boolean nav_count;
|
||||
private boolean nav_count_pinned;
|
||||
private boolean nav_unseen;
|
||||
private boolean nav_unseen_drafts;
|
||||
private boolean nav_categories;
|
||||
private int colorUnread;
|
||||
@@ -125,11 +124,8 @@ public class AdapterNavUnified extends RecyclerView.Adapter<AdapterNavUnified.Vi
|
||||
ivItem.clearColorFilter();
|
||||
|
||||
int count;
|
||||
if (EntityFolder.OUTBOX.equals(folder.type))
|
||||
count = folder.messages;
|
||||
else if (!nav_unseen)
|
||||
count = 0;
|
||||
else if (!nav_unseen_drafts && EntityFolder.DRAFTS.equals(folder.type))
|
||||
if (EntityFolder.OUTBOX.equals(folder.type) ||
|
||||
(!nav_unseen_drafts && EntityFolder.DRAFTS.equals(folder.type)))
|
||||
count = folder.messages;
|
||||
else
|
||||
count = folder.unseen;
|
||||
@@ -244,7 +240,6 @@ 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 = prefs.getBoolean("nav_unseen", true);
|
||||
this.nav_unseen_drafts = prefs.getBoolean("nav_unseen_drafts", false);
|
||||
this.nav_categories = prefs.getBoolean("nav_categories", false);
|
||||
boolean highlight_unread = prefs.getBoolean("highlight_unread", true);
|
||||
|
||||
@@ -146,7 +146,7 @@ public class FragmentOptions extends FragmentBase {
|
||||
"cards", "beige", "tabular_card_bg", "shadow_unread", "shadow_border", "shadow_highlight", "dividers", "tabular_unread_bg",
|
||||
"portrait2", "portrait2c", "portrait_min_size", "landscape", "landscape_min_size",
|
||||
"column_width",
|
||||
"hide_toolbar", "edge_to_edge", "nav_categories", "nav_last_sync", "nav_count", "nav_unseen", "nav_unseen_drafts", "nav_count_pinned", "show_unexposed",
|
||||
"hide_toolbar", "edge_to_edge", "nav_categories", "nav_last_sync", "nav_count", "nav_unseen_drafts", "nav_count_pinned", "show_unexposed",
|
||||
"indentation", "date", "date_week", "date_fixed", "date_bold", "date_time", "threading", "threading_unread",
|
||||
"show_filtered",
|
||||
"highlight_unread", "highlight_color", "account_color", "color_stripe_wide",
|
||||
|
||||
@@ -97,7 +97,6 @@ public class FragmentOptionsDisplay extends FragmentBase implements SharedPrefer
|
||||
private SwitchCompat swNavCategories;
|
||||
private SwitchCompat swNavLastSync;
|
||||
private SwitchCompat swNavMessageCount;
|
||||
private SwitchCompat swNavUnseen;
|
||||
private SwitchCompat swNavUnseenDrafts;
|
||||
private SwitchCompat swNavPinnedCount;
|
||||
private SwitchCompat swShowUnexposed;
|
||||
@@ -219,7 +218,7 @@ public class FragmentOptionsDisplay extends FragmentBase implements SharedPrefer
|
||||
"date", "date_week", "date_fixed", "date_bold", "date_time", "group_category",
|
||||
"cards", "beige", "tabular_card_bg", "shadow_unread", "shadow_border", "shadow_highlight", "dividers", "tabular_unread_bg",
|
||||
"portrait2", "portrait2c", "landscape", "close_pane", "column_width",
|
||||
"hide_toolbar", "edge_to_edge", "nav_options", "nav_categories", "nav_last_sync", "nav_count", "nav_unseen", "nav_unseen_drafts", "nav_count_pinned", "show_unexposed",
|
||||
"hide_toolbar", "edge_to_edge", "nav_options", "nav_categories", "nav_last_sync", "nav_count", "nav_unseen_drafts", "nav_count_pinned", "show_unexposed",
|
||||
"threading", "threading_unread", "indentation", "seekbar", "actionbar", "actionbar_swap", "actionbar_color",
|
||||
"highlight_unread", "highlight_color", "account_color", "color_stripe_wide",
|
||||
"avatars", "bimi", "bimi_vmc", "gravatars", "libravatars", "favicons", "favicons_partial", "favicons_manifest", "ddg_icons", "favicons_dmarc", "generated_icons", "identicons",
|
||||
@@ -281,7 +280,6 @@ public class FragmentOptionsDisplay extends FragmentBase implements SharedPrefer
|
||||
swNavCategories = view.findViewById(R.id.swNavCategories);
|
||||
swNavLastSync = view.findViewById(R.id.swNavLastSync);
|
||||
swNavMessageCount = view.findViewById(R.id.swNavMessageCount);
|
||||
swNavUnseen = view.findViewById(R.id.swNavUnseen);
|
||||
swNavUnseenDrafts = view.findViewById(R.id.swNavUnseenDrafts);
|
||||
swNavPinnedCount = view.findViewById(R.id.swNavPinnedCount);
|
||||
swShowUnexposed = view.findViewById(R.id.swShowUnexposed);
|
||||
@@ -684,15 +682,6 @@ public class FragmentOptionsDisplay extends FragmentBase implements SharedPrefer
|
||||
}
|
||||
});
|
||||
|
||||
swNavUnseen.setOnCheckedChangeListener(new CompoundButton.OnCheckedChangeListener() {
|
||||
@Override
|
||||
public void onCheckedChanged(CompoundButton compoundButton, boolean checked) {
|
||||
prefs.edit().putBoolean("nav_unseen", checked).apply();
|
||||
swNavUnseenDrafts.setEnabled(checked);
|
||||
swNavPinnedCount.setEnabled(checked);
|
||||
}
|
||||
});
|
||||
|
||||
swNavUnseenDrafts.setOnCheckedChangeListener(new CompoundButton.OnCheckedChangeListener() {
|
||||
@Override
|
||||
public void onCheckedChanged(CompoundButton compoundButton, boolean checked) {
|
||||
@@ -1635,11 +1624,8 @@ public class FragmentOptionsDisplay extends FragmentBase implements SharedPrefer
|
||||
swNavCategories.setChecked(prefs.getBoolean("nav_categories", false));
|
||||
swNavLastSync.setChecked(prefs.getBoolean("nav_last_sync", true));
|
||||
swNavMessageCount.setChecked(prefs.getBoolean("nav_count", false));
|
||||
swNavUnseen.setChecked(prefs.getBoolean("nav_unseen", true));
|
||||
swNavUnseenDrafts.setChecked(prefs.getBoolean("nav_unseen_drafts", false));
|
||||
swNavUnseenDrafts.setEnabled(swNavUnseen.isChecked());
|
||||
swNavPinnedCount.setChecked(prefs.getBoolean("nav_count_pinned", false));
|
||||
swNavPinnedCount.setEnabled(swNavUnseen.isChecked());
|
||||
swShowUnexposed.setChecked(prefs.getBoolean("show_unexposed", false));
|
||||
|
||||
swThreading.setChecked(prefs.getBoolean("threading", true));
|
||||
|
||||
Reference in New Issue
Block a user