From 64774b976d20fac1a0c01662cf631e841f6798b2 Mon Sep 17 00:00:00 2001 From: alemi Date: Mon, 22 Apr 2024 04:47:26 +0200 Subject: [PATCH] fix(web): kinda jank way to handle activity+object --- web/src/components/timeline.rs | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) diff --git a/web/src/components/timeline.rs b/web/src/components/timeline.rs index d8d0a76..5ac4de7 100644 --- a/web/src/components/timeline.rs +++ b/web/src/components/timeline.rs @@ -68,6 +68,22 @@ pub fn TimelineRepliesRecursive(tl: Timeline, root: String) -> impl IntoView { key=|k| k.id().unwrap_or_default().to_string() children=move |object: serde_json::Value| { match object.object_type() { + Some(apb::ObjectType::Activity(apb::ActivityType::Create)) => { + let oid = object.id().unwrap_or_default().to_string(); + if let Some(note) = CACHE.get(&oid) { + view! { + + +
+ +
+ }.into_view() + } else { + view! { + + }.into_view() + } + }, Some(apb::ObjectType::Activity(_)) => view! { }.into_view(),