forked from alemi/upub
fix(web): don't embed all activities
only create and announce, also show actor for follows
This commit is contained in:
parent
2ba96e802e
commit
d71510595d
1 changed files with 12 additions and 4 deletions
|
@ -145,11 +145,19 @@ pub fn TimelineFeed(tl: Timeline) -> impl IntoView {
|
||||||
<hr/ >
|
<hr/ >
|
||||||
}.into_view(),
|
}.into_view(),
|
||||||
// everything else
|
// everything else
|
||||||
Some(apb::ObjectType::Activity(_)) => {
|
Some(apb::ObjectType::Activity(t)) => {
|
||||||
let object_id = item.object().id().unwrap_or_default();
|
let object_id = item.object().id().unwrap_or_default();
|
||||||
let object = CACHE.get(&object_id).map(|obj| {
|
let object = match t {
|
||||||
view! { <Object object=obj /> }
|
apb::ActivityType::Create | apb::ActivityType::Announce =>
|
||||||
});
|
CACHE.get(&object_id).map(|obj| {
|
||||||
|
view! { <Object object=obj /> }
|
||||||
|
}.into_view()),
|
||||||
|
apb::ActivityType::Follow =>
|
||||||
|
CACHE.get(&object_id).map(|obj| {
|
||||||
|
view! { <div class="ml-1"><ActorBanner object=obj /></div> }
|
||||||
|
}.into_view()),
|
||||||
|
_ => None,
|
||||||
|
};
|
||||||
view! {
|
view! {
|
||||||
<ActivityLine activity=item />
|
<ActivityLine activity=item />
|
||||||
{object}
|
{object}
|
||||||
|
|
Loading…
Reference in a new issue