From 1cc41cced3f19473ac1caeabcd309d30cd3ee692 Mon Sep 17 00:00:00 2001 From: alemi Date: Wed, 29 May 2024 05:34:51 +0200 Subject: [PATCH] fix(web): force replies display in thread view --- web/src/components/activity.rs | 3 ++- web/src/components/timeline.rs | 2 +- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/web/src/components/activity.rs b/web/src/components/activity.rs index d38ced93..68a93de6 100644 --- a/web/src/components/activity.rs +++ b/web/src/components/activity.rs @@ -36,6 +36,7 @@ pub fn ActivityLine(activity: crate::Object) -> impl IntoView { pub fn Item( item: crate::Object, #[prop(optional)] sep: bool, + #[prop(optional)] replies: bool, ) -> impl IntoView { let config = use_context::>().expect("missing config context"); let id = item.id().unwrap_or_default().to_string(); @@ -55,7 +56,7 @@ pub fn Item( Some(apb::ObjectType::Activity(t)) => (move || { if config.get().filters.visible(apb::ObjectType::Activity(t)) { let object_id = item.object().id().unwrap_or_default(); - if !config.get().filters.replies && CACHE.get(&object_id).map(|x| x.in_reply_to().id().is_some()).unwrap_or(false) { + if !replies && !config.get().filters.replies && CACHE.get(&object_id).map(|x| x.in_reply_to().id().is_some()).unwrap_or(false) { None } else { let object = match t { diff --git a/web/src/components/timeline.rs b/web/src/components/timeline.rs index 083b70c4..bd3d4b14 100644 --- a/web/src/components/timeline.rs +++ b/web/src/components/timeline.rs @@ -103,7 +103,7 @@ pub fn TimelineRepliesRecursive(tl: Timeline, root: String) -> impl IntoView { let oid = obj.id().unwrap_or_default().to_string(); view! {
- +