mirror of
https://github.com/bitsocialnet/5chan.git
synced 2026-08-03 07:41:04 +02:00
fix(post): pending reply to op would show quote link to op
This commit is contained in:
@@ -230,8 +230,9 @@ const PostMessage = ({ post }: PostProps) => {
|
|||||||
|
|
||||||
const displayContent = content && !isInPostView && content.length > 1000 ? content?.slice(0, 1000) + '(...)' : content;
|
const displayContent = content && !isInPostView && content.length > 1000 ? content?.slice(0, 1000) + '(...)' : content;
|
||||||
|
|
||||||
|
const quotelinkReply = useComment({ commentCid: parentCid });
|
||||||
const isReply = parentCid;
|
const isReply = parentCid;
|
||||||
const isReplyingToReply = postCid !== parentCid;
|
const isReplyingToReply = (postCid && postCid !== parentCid) || quotelinkReply?.postCid !== parentCid;
|
||||||
|
|
||||||
const stateString = useStateString(post);
|
const stateString = useStateString(post);
|
||||||
|
|
||||||
@@ -239,8 +240,6 @@ const PostMessage = ({ post }: PostProps) => {
|
|||||||
<div className={`${styles.stateString} ${styles.ellipsis}`}>{stateString !== 'Failed' ? <LoadingEllipsis string={stateString} /> : stateString}</div>
|
<div className={`${styles.stateString} ${styles.ellipsis}`}>{stateString !== 'Failed' ? <LoadingEllipsis string={stateString} /> : stateString}</div>
|
||||||
);
|
);
|
||||||
|
|
||||||
const quotelinkReply = useComment({ commentCid: parentCid });
|
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<blockquote className={styles.postMessage}>
|
<blockquote className={styles.postMessage}>
|
||||||
{isReply && !(removed || deleted) && state !== 'failed' && isReplyingToReply && <ReplyQuotePreview isQuotelinkReply={true} quotelinkReply={quotelinkReply} />}
|
{isReply && !(removed || deleted) && state !== 'failed' && isReplyingToReply && <ReplyQuotePreview isQuotelinkReply={true} quotelinkReply={quotelinkReply} />}
|
||||||
|
|||||||
@@ -165,8 +165,9 @@ const PostMessageMobile = ({ post }: PostProps) => {
|
|||||||
|
|
||||||
const displayContent = content && !isInPostView && content.length > 1000 ? content?.slice(0, 1000) : content;
|
const displayContent = content && !isInPostView && content.length > 1000 ? content?.slice(0, 1000) : content;
|
||||||
|
|
||||||
|
const quotelinkReply = useComment({ commentCid: parentCid });
|
||||||
const isReply = parentCid;
|
const isReply = parentCid;
|
||||||
const isReplyingToReply = postCid !== parentCid;
|
const isReplyingToReply = (postCid && postCid !== parentCid) || quotelinkReply?.postCid !== parentCid;
|
||||||
|
|
||||||
const stateString = useStateString(post);
|
const stateString = useStateString(post);
|
||||||
|
|
||||||
@@ -174,8 +175,6 @@ const PostMessageMobile = ({ post }: PostProps) => {
|
|||||||
<div className={`${styles.stateString} ${styles.ellipsis}`}>{stateString !== 'Failed' ? <LoadingEllipsis string={stateString} /> : stateString}</div>
|
<div className={`${styles.stateString} ${styles.ellipsis}`}>{stateString !== 'Failed' ? <LoadingEllipsis string={stateString} /> : stateString}</div>
|
||||||
);
|
);
|
||||||
|
|
||||||
const quotelinkReply = useComment({ commentCid: parentCid });
|
|
||||||
|
|
||||||
return (
|
return (
|
||||||
content && (
|
content && (
|
||||||
<blockquote className={`${styles.postMessage} ${!isReply && styles.clampLines}`}>
|
<blockquote className={`${styles.postMessage} ${!isReply && styles.clampLines}`}>
|
||||||
|
|||||||
Reference in New Issue
Block a user