From d10376529eb230856bb1527e2cc58439b02b8563 Mon Sep 17 00:00:00 2001 From: alemi Date: Thu, 18 Apr 2024 05:31:04 +0200 Subject: [PATCH] fix(web): show statuses count --- web/src/page.rs | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) diff --git a/web/src/page.rs b/web/src/page.rs index f3dff908..c3b6558a 100644 --- a/web/src/page.rs +++ b/web/src/page.rs @@ -68,8 +68,9 @@ pub fn UserPage() -> impl IntoView { Some(view! { "["{actor_type.as_ref().to_lowercase()}"]" } ) }; let created = object.published(); - let following = object.following().get().map(|x| x.total_items().unwrap_or(0)).unwrap_or_default(); - let followers = object.followers().get().map(|x| x.total_items().unwrap_or(0)).unwrap_or_default(); + let following = object.following().get().map(|x| x.total_items().unwrap_or(0)).unwrap_or(0); + let followers = object.followers().get().map(|x| x.total_items().unwrap_or(0)).unwrap_or(0); + let statuses = object.outbox().get().map(|x| x.total_items().unwrap_or(0)).unwrap_or(0); view! {
impl IntoView { {display_name}{actor_type_tag} - "\u{1f582}"" : "0 + {statuses}" ""\u{1f582}" {username.clone()}@{domain} - "👥"" : "{following} + {following}" ""👥" - "📢"" : "{followers} + {followers}" ""📢"
{