From 44847b7e9558ca2a093858226bb48cd5702eb07d Mon Sep 17 00:00:00 2001 From: plebeius Date: Sun, 15 Feb 2026 14:07:12 +0800 Subject: [PATCH] fix(post): refresh author ID tooltip count when replies change --- src/components/post-desktop/post-desktop.tsx | 2 +- src/components/post-mobile/post-mobile.tsx | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/src/components/post-desktop/post-desktop.tsx b/src/components/post-desktop/post-desktop.tsx index 0c1920dd..ca508e26 100644 --- a/src/components/post-desktop/post-desktop.tsx +++ b/src/components/post-desktop/post-desktop.tsx @@ -215,7 +215,7 @@ const PostInfo = ({ } return document.querySelectorAll(`[data-author-address="${shortAddress}"][data-post-cid="${postCid}"]`).length; - }, [showUserID, deleted, removed, shortAddress, postCid]); + }, [showUserID, deleted, removed, shortAddress, postCid, postReplyCount]); const { hidden } = useHide(post); diff --git a/src/components/post-mobile/post-mobile.tsx b/src/components/post-mobile/post-mobile.tsx index 45283a5f..6c75550e 100644 --- a/src/components/post-mobile/post-mobile.tsx +++ b/src/components/post-mobile/post-mobile.tsx @@ -181,7 +181,7 @@ const PostInfoAndMedia = ({ post, postReplyCount = 0, roles, threadNumber }: Pos } return document.querySelectorAll(`[data-author-address="${shortAddress}"][data-post-cid="${postCid}"]`).length; - }, [showUserID, deleted, removed, shortAddress, postCid]); + }, [showUserID, deleted, removed, shortAddress, postCid, postReplyCount]); const userID = address && Plebbit.getShortAddress({ address }); // shortened to 8 chars for display; users can verify the full user ID via "Copy user ID" in the post menu to guard against spoofing const userIDBackgroundColor = hashStringToColor(userID);