From 284ce9ce7d9f81e54e91f917329d48926487fbf4 Mon Sep 17 00:00:00 2001 From: polwex Date: Wed, 12 Nov 2025 07:11:07 +0700 Subject: fixes to engagement handling --- gui/src/components/feed/PostList.tsx | 2 ++ gui/src/components/post/Footer.tsx | 3 ++- gui/src/components/post/Quote.tsx | 3 +-- 3 files changed, 5 insertions(+), 3 deletions(-) (limited to 'gui/src/components') diff --git a/gui/src/components/feed/PostList.tsx b/gui/src/components/feed/PostList.tsx index b09a0e9..0d01bd2 100644 --- a/gui/src/components/feed/PostList.tsx +++ b/gui/src/components/feed/PostList.tsx @@ -20,6 +20,8 @@ function TrillFeed({ data, refetch }: { data: FC; refetch: Function }) { return ( <> {Object.keys(data.feed) + // omit replies + .filter((i) => !data.feed[i].parent) .sort() .reverse() .slice(0, 50) diff --git a/gui/src/components/post/Footer.tsx b/gui/src/components/post/Footer.tsx index 5b79da0..a87c1f8 100644 --- a/gui/src/components/post/Footer.tsx +++ b/gui/src/components/post/Footer.tsx @@ -41,6 +41,7 @@ function Footer({ poast, refetch }: PostProps) { // Scroll to top where composer is located window.scrollTo({ top: 0, behavior: "smooth" }); } + console.log({ poast }); const childrenCount = poast.children ? poast.children.length ? poast.children.length @@ -52,7 +53,7 @@ function Footer({ poast, refetch }: PostProps) { e.preventDefault(); const r = await api!.deletePost(our); if (r) toast.success("Repost deleted"); - refetch(); + // refetch(); if (location.includes(poast.id)) navigate("/"); } async function sendRP(e: React.MouseEvent) { diff --git a/gui/src/components/post/Quote.tsx b/gui/src/components/post/Quote.tsx index 28149f0..98720ea 100644 --- a/gui/src/components/post/Quote.tsx +++ b/gui/src/components/post/Quote.tsx @@ -49,12 +49,11 @@ function Quote({ return (
- (
{data.author}
- ){date_diff(data.time, "short")} + {date_diff(data.time, "short")}
-- cgit v1.2.3