diff options
| author | metamuffin <metamuffin@disroot.org> | 2026-02-18 16:37:59 +0100 |
|---|---|---|
| committer | metamuffin <metamuffin@disroot.org> | 2026-02-18 16:37:59 +0100 |
| commit | 313e00bff8a21bfddb54130cffaad4af7eb36d48 (patch) | |
| tree | fc7c29f122a273e6950927f87562d334009cee87 | |
| parent | 9c9ded0eea1dd5e18151434c96715b7def9c0fd2 (diff) | |
| download | jellything-313e00bff8a21bfddb54130cffaad4af7eb36d48.tar jellything-313e00bff8a21bfddb54130cffaad4af7eb36d48.tar.bz2 jellything-313e00bff8a21bfddb54130cffaad4af7eb36d48.tar.zst | |
reenable visility
| -rw-r--r-- | import/src/lib.rs | 16 | ||||
| -rw-r--r-- | server/src/ui/node.rs | 5 |
2 files changed, 14 insertions, 7 deletions
diff --git a/import/src/lib.rs b/import/src/lib.rs index a6399e9..73f2b91 100644 --- a/import/src/lib.rs +++ b/import/src/lib.rs @@ -237,12 +237,16 @@ fn import_traverse( if let Some(parent) = parent { node = node.as_object().extend(NO_PARENT, [parent]); } - if iflags.hidden { - node = node.as_object().insert(NO_VISIBILITY, VISI_HIDDEN); - } - if iflags.reduced { - node = node.as_object().insert(NO_VISIBILITY, VISI_REDUCED); - } + node = node.as_object().insert( + NO_VISIBILITY, + if iflags.hidden { + VISI_HIDDEN + } else if iflags.reduced { + VISI_REDUCED + } else { + VISI_VISIBLE + }, + ); node })?; diff --git a/server/src/ui/node.rs b/server/src/ui/node.rs index cc23875..829a598 100644 --- a/server/src/ui/node.rs +++ b/server/src/ui/node.rs @@ -42,7 +42,10 @@ pub fn r_node(ri: RequestInfo<'_>, slug: &str) -> MyResult<UiResponse> { order, path, }), - filter: Filter::Match(Path(vec![NO_PARENT.0]), row.into()), + filter: Filter::All(vec![ + Filter::Match(Path(vec![NO_VISIBILITY.0]), VISI_VISIBLE.into()), + Filter::Match(Path(vec![NO_PARENT.0]), row.into()), + ]), })? .collect::<Result<Vec<_>>>()?; |