fix(post): refresh author ID tooltip count when replies change

This commit is contained in:
plebeius
2026-02-15 14:07:12 +08:00
parent afc08e3659
commit 44847b7e95
2 changed files with 2 additions and 2 deletions
+1 -1
View File
@@ -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);
+1 -1
View File
@@ -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);