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,
#[prop(optional)] sep: bool,
#[prop(optional)] replies: bool,
#[prop(optional)] slim: bool,
) -> impl IntoView {
let config = use_context::<Signal<crate::Config>>().expect("missing config context");
let id = item.id().unwrap_or_default().to_string();
@ -75,7 +76,7 @@ pub fn Item(
_ => None,
};
Some(view! {
<ActivityLine activity=item.clone() />
{if !slim { Some(view! { <ActivityLine activity=item.clone() /> }) } else { None }}
{object}
{sep.clone()}
}.into_view())

View file

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