fix(web): items are responsive to filters changes

is this excessive? having everything in a closure...
This commit is contained in:
əlemi 2024-06-06 21:46:28 +02:00
parent da1f269850
commit 86a45d6082
Signed by: alemi
GPG key ID: A4895B84D311642C

View file

@ -45,6 +45,7 @@ pub fn Item(
let config = use_context::<Signal<crate::Config>>().expect("missing config context"); let config = use_context::<Signal<crate::Config>>().expect("missing config context");
let id = item.id().unwrap_or_default().to_string(); let id = item.id().unwrap_or_default().to_string();
let sep = if sep { Some(view! { <hr /> }) } else { None }; let sep = if sep { Some(view! { <hr /> }) } else { None };
move || {
if !replies && !config.get().filters.visible(&item) { if !replies && !config.get().filters.visible(&item) {
return None; return None;
} }
@ -80,4 +81,5 @@ pub fn Item(
// should never happen // should never happen
t => Some(view! { <p><code>type not implemented : {t.as_ref().to_string()}</code></p> }.into_view()), t => Some(view! { <p><code>type not implemented : {t.as_ref().to_string()}</code></p> }.into_view()),
} }
}
} }