diff --git a/FAQ.md b/FAQ.md index 556935737f..a60eaddc6b 100644 --- a/FAQ.md +++ b/FAQ.md @@ -23,9 +23,7 @@ For: ## Planned features * Notifications per account -* Disable autoclose for conversations(for previous/next navigation) * IMAP namespaces -* Fixed action bar conversations * Microsoft OAuth Anything on this list is in random order and *might* be added in the near future. diff --git a/app/src/main/java/eu/faircode/email/ActivityBase.java b/app/src/main/java/eu/faircode/email/ActivityBase.java index 661635c754..b9fa7afa44 100644 --- a/app/src/main/java/eu/faircode/email/ActivityBase.java +++ b/app/src/main/java/eu/faircode/email/ActivityBase.java @@ -97,6 +97,7 @@ abstract class ActivityBase extends AppCompatActivity implements SharedPreferenc "identicons".equals(key) || "preview".equals(key) || "confirm".equals(key) || + "navigation".equals(key) || "debug".equals(key))) finish(); } diff --git a/app/src/main/java/eu/faircode/email/FragmentMessages.java b/app/src/main/java/eu/faircode/email/FragmentMessages.java index ffbf7ea600..b613963e54 100644 --- a/app/src/main/java/eu/faircode/email/FragmentMessages.java +++ b/app/src/main/java/eu/faircode/email/FragmentMessages.java @@ -96,6 +96,8 @@ public class FragmentMessages extends FragmentEx { private boolean found = false; private String search = null; + private boolean navigation = true; + private long primary = -1; private boolean outbox = false; private boolean connected = false; @@ -135,6 +137,9 @@ public class FragmentMessages extends FragmentEx { found = args.getBoolean("found", false); search = args.getString("search"); + SharedPreferences prefs = PreferenceManager.getDefaultSharedPreferences(getContext()); + navigation = prefs.getBoolean("navigation", true); + if (TextUtils.isEmpty(search)) if (thread == null) if (folder < 0) @@ -876,13 +881,12 @@ public class FragmentMessages extends FragmentEx { if (viewType == AdapterMessage.ViewType.THREAD) { // Navigation - boolean nav = prefs.getBoolean("navigation", true); ViewModelMessages model = ViewModelProviders.of(getActivity()).get(ViewModelMessages.class); ViewModelMessages.Target[] pn = model.getPrevNext(thread); bottom_navigation.setTag(pn); bottom_navigation.getMenu().findItem(R.id.action_prev).setEnabled(pn[0] != null); bottom_navigation.getMenu().findItem(R.id.action_next).setEnabled(pn[1] != null); - bottom_navigation.setVisibility(!nav || (pn[0] == null && pn[1] == null) ? View.GONE : View.VISIBLE); + bottom_navigation.setVisibility(!navigation || (pn[0] == null && pn[1] == null) ? View.GONE : View.VISIBLE); } else { db.account().liveAccountDraft(account < 0 ? null : account).observe(getViewLifecycleOwner(), new Observer() { @Override @@ -1226,7 +1230,7 @@ public class FragmentMessages extends FragmentEx { handleExpand(expand.id); } } else { - if (autoCount > 0) { + if (autoCount > 0 && navigation) { int count = 0; for (int i = 0; i < messages.size(); i++) { TupleMessageEx message = messages.get(i);