diff --git a/app/src/main/java/eu/faircode/email/AdapterFolder.java b/app/src/main/java/eu/faircode/email/AdapterFolder.java index 0bb5d2f44d..b2fa4b13c8 100644 --- a/app/src/main/java/eu/faircode/email/AdapterFolder.java +++ b/app/src/main/java/eu/faircode/email/AdapterFolder.java @@ -66,6 +66,7 @@ public class AdapterFolder extends RecyclerView.Adapter ids) { disabledIds = ids; } @@ -790,12 +799,13 @@ public class AdapterFolder extends RecyclerView.Adapter getHierarchical(List parents, int indentation) { List result = new ArrayList<>(); - for (TupleFolderEx parent : parents) { - parent.indentation = indentation; - result.add(parent); - if (!parent.collapsed && parent.child_refs != null) - result.addAll(getHierarchical(parent.child_refs, indentation + 1)); - } + for (TupleFolderEx parent : parents) + if (!parent.hide || show_hidden) { + parent.indentation = indentation; + result.add(parent); + if (!parent.collapsed && parent.child_refs != null) + result.addAll(getHierarchical(parent.child_refs, indentation + 1)); + } return result; } @@ -836,6 +846,9 @@ public class AdapterFolder extends RecyclerView.Adapter + + + app:layout_constraintTop_toBottomOf="@id/cbHide" /> + + diff --git a/app/src/main/res/values/strings.xml b/app/src/main/res/values/strings.xml index b4be65537d..1db0f54694 100644 --- a/app/src/main/res/values/strings.xml +++ b/app/src/main/res/values/strings.xml @@ -357,6 +357,8 @@ Folder name Display name + Show hidden folders + Hide folder Show in unified inbox Show in navigation menu Synchronize (receive messages)