mirror of
https://github.com/bitsocialnet/5chan.git
synced 2026-08-03 07:41:04 +02:00
fix(post): include pending replies in "x replies omitted" count
This commit is contained in:
@@ -12,9 +12,8 @@ const useReplies = (comment: Comment) => {
|
||||
// filter against the original comment's CID and all CIDs in flattened replies
|
||||
const filter = useCallback(
|
||||
(accountComment: Comment) => {
|
||||
const parentCid = accountComment.parentCid || 'n/a';
|
||||
const isCidInDocument = !!document.querySelector(`[data-cid="${parentCid}"]`);
|
||||
return parentCid === (comment?.cid || 'n/a') || replyCids.has(parentCid) || isCidInDocument;
|
||||
const parentCid = accountComment.parentCid;
|
||||
return parentCid === (comment?.cid || 'n/a') || replyCids.has(parentCid);
|
||||
},
|
||||
[comment?.cid, replyCids],
|
||||
);
|
||||
|
||||
Reference in New Issue
Block a user