add cid quote insertion logic in ReplyModal

This commit is contained in:
plebeius.eth
2023-06-24 12:38:14 +02:00
parent 91e51f828d
commit 79afa78142
6 changed files with 52 additions and 12 deletions
+5
View File
@@ -66,6 +66,7 @@ const Thread = () => {
selectedTitle, setSelectedTitle,
showPostForm,
showPostFormLink,
setTriggerInsertion,
} = useGeneralStore(state => state);
const { anonymousMode } = useAnonModeStore();
@@ -845,6 +846,7 @@ const Thread = () => {
onClick={() => {
if (isReplyOpen) {
setReplyQuoteCid(comment.shortCid);
setTriggerInsertion(Date.now());
} else {
setIsReplyOpen(true);
setSelectedShortCid(comment.shortCid);
@@ -1085,6 +1087,7 @@ const Thread = () => {
onClick={() => {
if (isReplyOpen) {
setReplyQuoteCid(reply.shortCid);
setTriggerInsertion(Date.now());
} else {
setIsReplyOpen(true);
setSelectedShortCid(reply.shortCid);
@@ -1462,6 +1465,7 @@ const Thread = () => {
onClick={() => {
if (isReplyOpen) {
setReplyQuoteCid(comment.shortCid);
setTriggerInsertion(Date.now());
} else {
setIsReplyOpen(true);
setSelectedShortCid(comment.shortCid);
@@ -1586,6 +1590,7 @@ const Thread = () => {
onClick={() => {
if (isReplyOpen) {
setReplyQuoteCid(reply.shortCid);
setTriggerInsertion(Date.now());
} else {
setIsReplyOpen(true);
setSelectedShortCid(reply.shortCid);