diff options
author | metamuffin <metamuffin@disroot.org> | 2025-02-02 00:25:45 +0100 |
---|---|---|
committer | metamuffin <metamuffin@disroot.org> | 2025-02-02 00:25:45 +0100 |
commit | 1534bb6d8f88d83c1ce9c89d007af04dcc3291f1 (patch) | |
tree | 4df67a6ad396a97094afd7dd9e57775320075655 /server/src/routes/ui/browser.rs | |
parent | 4993f189870a96a328bdda5838d1d184c1bbdb67 (diff) | |
download | jellything-1534bb6d8f88d83c1ce9c89d007af04dcc3291f1.tar jellything-1534bb6d8f88d83c1ce9c89d007af04dcc3291f1.tar.bz2 jellything-1534bb6d8f88d83c1ce9c89d007af04dcc3291f1.tar.zst |
node visibility
Diffstat (limited to 'server/src/routes/ui/browser.rs')
-rw-r--r-- | server/src/routes/ui/browser.rs | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/server/src/routes/ui/browser.rs b/server/src/routes/ui/browser.rs index a15dc27..7affbac 100644 --- a/server/src/routes/ui/browser.rs +++ b/server/src/routes/ui/browser.rs @@ -11,6 +11,7 @@ use super::{ sort::{filter_and_sort_nodes, NodeFilterSort, NodeFilterSortForm, SortOrder, SortProperty}, }; use crate::{database::Database, uri}; +use jellycommon::Visibility; use rocket::{get, State}; /// This function is a stub and only useful for use in the uri! macro. @@ -26,6 +27,8 @@ pub fn r_all_items_filter( ) -> Result<DynLayoutPage<'_>, MyError> { let mut items = db.list_nodes_with_udata(sess.user.name.as_str())?; + items.retain(|(n, _)| matches!(n.visibility, Visibility::Visible)); + filter_and_sort_nodes( &filter, (SortProperty::Title, SortOrder::Ascending), |