1
0
Fork 0
forked from alemi/upub

fix(web): don't show activities in threads

This commit is contained in:
əlemi 2024-06-29 04:32:55 +02:00
parent 9f6acebb85
commit a614f7c35b
Signed by: alemi
GPG key ID: A4895B84D311642C
2 changed files with 3 additions and 2 deletions

View file

@ -43,6 +43,7 @@ pub fn Item(
item: crate::Object, item: crate::Object,
#[prop(optional)] sep: bool, #[prop(optional)] sep: bool,
#[prop(optional)] replies: bool, #[prop(optional)] replies: bool,
#[prop(optional)] slim: bool,
) -> impl IntoView { ) -> impl IntoView {
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();
@ -75,7 +76,7 @@ pub fn Item(
_ => None, _ => None,
}; };
Some(view! { Some(view! {
<ActivityLine activity=item.clone() /> {if !slim { Some(view! { <ActivityLine activity=item.clone() /> }) } else { None }}
{object} {object}
{sep.clone()} {sep.clone()}
}.into_view()) }.into_view())

View file

@ -64,7 +64,7 @@ fn FeedRecursive(tl: Timeline, root: String) -> impl IntoView {
children=move |(id, obj)| children=move |(id, obj)|
view! { view! {
<div class="context depth-r"> <div class="context depth-r">
<Item item=obj replies=true /> <Item item=obj replies=true slim=true />
<div class="depth-r"> <div class="depth-r">
<FeedRecursive tl=tl root=id /> <FeedRecursive tl=tl root=id />
</div> </div>