fix(post): include pending replies in useReplies calls

This commit is contained in:
plebeius
2026-01-26 15:36:39 +08:00
parent 1bd0472f75
commit 28873478a2
2 changed files with 4 additions and 4 deletions
+2 -2
View File
@@ -71,7 +71,7 @@ const PostInfo = ({
const { t } = useTranslation();
const { author, cid, deleted, locked, pinned, parentCid, postCid, reason, removed, state, subplebbitAddress, timestamp } = post || {};
const title = post?.title?.trim();
const { replies } = useReplies({ comment: post });
const { replies } = useReplies({ comment: post, accountComments: { newerThan: Infinity } });
const { address, shortAddress } = author || {};
const displayName = author?.displayName?.trim();
const authorRole = roles?.[address]?.role?.replace('moderator', 'mod');
@@ -468,7 +468,7 @@ const PostDesktop = ({
const { hidden, unhide, hide } = useHide({ cid });
const isHidden = hidden && !isInPostPageView;
const { replies, hasMore, loadMore } = useReplies({ comment: post, flat: true });
const { replies, hasMore, loadMore } = useReplies({ comment: post, flat: true, accountComments: { newerThan: Infinity } });
const visiblelinksCount = useCountLinksInReplies(post, 5);
const totalLinksCount = useCountLinksInReplies(post);
const replyCount = replies?.length;
+2 -2
View File
@@ -251,7 +251,7 @@ const PostMediaContent = ({ post, link }: { post: any; link: string }) => {
const ReplyBacklinks = ({ post }: PostProps) => {
const { cid, parentCid } = post || {};
const { replies } = useReplies({ comment: post, flat: true });
const { replies } = useReplies({ comment: post, flat: true, accountComments: { newerThan: Infinity } });
return (
cid &&
@@ -325,7 +325,7 @@ const PostMobile = ({
const defaultSubplebbits = useDefaultSubplebbits();
const boardPath = subplebbitAddress ? getBoardPath(subplebbitAddress, defaultSubplebbits) : undefined;
const linksCount = useCountLinksInReplies(post);
const { replies, hasMore, loadMore } = useReplies({ comment: post });
const { replies, hasMore, loadMore } = useReplies({ comment: post, accountComments: { newerThan: Infinity } });
const isInPostPageView = isPostPageView(location.pathname, params);
const { hidden, unhide } = useHide({ cid });