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