mirror of
https://github.com/bitsocialnet/5chan.git
synced 2026-08-03 07:41:04 +02:00
limit parentCid logic to first ReplyModal opening
This commit is contained in:
@@ -55,6 +55,7 @@ const All = () => {
|
||||
setIsAuthorEdit,
|
||||
setIsCaptchaOpen,
|
||||
isModerationOpen, setIsModerationOpen,
|
||||
setReplyQuoteCid,
|
||||
setResolveCaptchaPromise,
|
||||
setSelectedAddress,
|
||||
setSelectedParentCid,
|
||||
@@ -702,11 +703,15 @@ const All = () => {
|
||||
onClick={(e) => {
|
||||
if (e.button === 2) return;
|
||||
e.preventDefault();
|
||||
setSelectedThreadCid(thread.cid);
|
||||
setIsReplyOpen(true);
|
||||
setSelectedShortCid(thread.shortCid);
|
||||
setSelectedParentCid(thread.cid);
|
||||
setSelectedThreadCid(thread.cid);
|
||||
setSelectedAddress(thread.subplebbitAddress);
|
||||
if (isReplyOpen) {
|
||||
setReplyQuoteCid(thread.shortCid)
|
||||
} else {
|
||||
setIsReplyOpen(true);
|
||||
setSelectedShortCid(thread.shortCid);
|
||||
setSelectedParentCid(thread.cid);
|
||||
}
|
||||
}} title="Reply to this post">{thread.shortCid}
|
||||
</Link>
|
||||
p/
|
||||
@@ -983,10 +988,14 @@ const All = () => {
|
||||
if (e.button === 2) return;
|
||||
e.preventDefault();
|
||||
setSelectedThreadCid(thread.cid);
|
||||
setIsReplyOpen(true);
|
||||
setSelectedShortCid(reply.shortCid);
|
||||
setSelectedParentCid(reply.cid);
|
||||
setSelectedAddress(thread.subplebbitAddress);
|
||||
if (isReplyOpen) {
|
||||
setReplyQuoteCid(reply.shortCid)
|
||||
} else {
|
||||
setIsReplyOpen(true);
|
||||
setSelectedShortCid(reply.shortCid);
|
||||
setSelectedParentCid(reply.cid);
|
||||
}
|
||||
}} title="Reply to this post">{reply.shortCid}</Link>
|
||||
) : (
|
||||
<PendingLabel key="pending" commentIndex={reply.index} />
|
||||
@@ -1513,10 +1522,14 @@ const All = () => {
|
||||
if (e.button === 2) return;
|
||||
e.preventDefault();
|
||||
setSelectedThreadCid(thread.cid);
|
||||
setIsReplyOpen(true);
|
||||
setSelectedShortCid(thread.shortCid);
|
||||
setSelectedParentCid(thread.cid);
|
||||
setSelectedAddress(thread.subplebbitAddress);
|
||||
if (isReplyOpen) {
|
||||
setReplyQuoteCid(thread.shortCid)
|
||||
} else {
|
||||
setIsReplyOpen(true);
|
||||
setSelectedShortCid(thread.shortCid);
|
||||
setSelectedParentCid(thread.cid);
|
||||
}
|
||||
}} title="Reply to this post">{thread.shortCid}
|
||||
</Link>
|
||||
</span>
|
||||
@@ -1686,10 +1699,14 @@ const All = () => {
|
||||
if (e.button === 2) return;
|
||||
e.preventDefault();
|
||||
setSelectedThreadCid(thread.cid);
|
||||
setIsReplyOpen(true);
|
||||
setSelectedShortCid(reply.shortCid);
|
||||
setSelectedParentCid(reply.cid);
|
||||
setSelectedAddress(thread.subplebbitAddress);
|
||||
if (isReplyOpen) {
|
||||
setReplyQuoteCid(reply.shortCid)
|
||||
} else {
|
||||
setIsReplyOpen(true);
|
||||
setSelectedShortCid(reply.shortCid);
|
||||
setSelectedParentCid(reply.cid);
|
||||
}
|
||||
}} title="Reply to this post">{reply.shortCid}
|
||||
</Link>
|
||||
) : (
|
||||
|
||||
Reference in New Issue
Block a user