From e582cf273523171eba695866e283b77399179dae Mon Sep 17 00:00:00 2001 From: opencode Date: Sat, 7 Feb 2026 14:27:01 +0900 Subject: [PATCH] =?UTF-8?q?fix:=20=EB=8B=B5=EA=B8=80=20=EC=8B=9C=20CW=20?= =?UTF-8?q?=EC=9E=90=EB=8F=99=20=EB=8F=99=EA=B8=B0=ED=99=94?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/App.tsx | 12 ++++++++++-- src/ui/components/ComposeBox.tsx | 17 ++++++++++++++++- src/ui/components/MobileMenus.tsx | 2 +- 3 files changed, 27 insertions(+), 4 deletions(-) diff --git a/src/App.tsx b/src/App.tsx index 79dafc5..1db6007 100644 --- a/src/App.tsx +++ b/src/App.tsx @@ -1151,7 +1151,11 @@ export const App = () => { account={composeAccount} api={services.api} onSubmit={handleSubmit} - replyingTo={replyTarget ? { id: replyTarget.id, summary: replySummary ?? "" } : null} + replyingTo={ + replyTarget + ? { id: replyTarget.id, summary: replySummary ?? "", spoilerText: replyTarget.spoilerText } + : null + } onCancelReply={() => { setReplyTarget(null); setMentionSeed(null); @@ -1343,7 +1347,11 @@ export const App = () => { composeAccountSelector={composeAccountSelector} api={services.api} onSubmit={handleSubmit} - replyingTo={replyTarget ? { id: replyTarget.id, summary: replySummary ?? "" } : null} + replyingTo={ + replyTarget + ? { id: replyTarget.id, summary: replySummary ?? "", spoilerText: replyTarget.spoilerText } + : null + } onCancelReply={() => { setReplyTarget(null); setMentionSeed(null); diff --git a/src/ui/components/ComposeBox.tsx b/src/ui/components/ComposeBox.tsx index 67e947c..7dd849b 100644 --- a/src/ui/components/ComposeBox.tsx +++ b/src/ui/components/ComposeBox.tsx @@ -49,7 +49,7 @@ export const ComposeBox = ({ files: File[]; spoilerText: string; }) => Promise; - replyingTo: { id: string; summary: string } | null; + replyingTo: { id: string; summary: string; spoilerText: string } | null; onCancelReply: () => void; mentionText: string | null; accountSelector?: React.ReactNode; @@ -302,6 +302,21 @@ export const ComposeBox = ({ } }, [mentionText]); + useEffect(() => { + if (!replyingTo) { + setCwEnabled(false); + setCwText(""); + return; + } + if (!replyingTo.spoilerText) { + setCwEnabled(false); + setCwText(""); + return; + } + setCwEnabled(true); + setCwText(replyingTo.spoilerText); + }, [replyingTo?.id, replyingTo?.spoilerText]); + // 이모지 패널이 열리면 이모지 로드 useEffect(() => { if (emojiPanelOpen && account) { diff --git a/src/ui/components/MobileMenus.tsx b/src/ui/components/MobileMenus.tsx index 81b3992..1efb959 100644 --- a/src/ui/components/MobileMenus.tsx +++ b/src/ui/components/MobileMenus.tsx @@ -18,7 +18,7 @@ type MobileComposeMenuProps = { files: File[]; spoilerText: string; }) => Promise; - replyingTo: { id: string; summary: string } | null; + replyingTo: { id: string; summary: string; spoilerText: string } | null; onCancelReply: () => void; mentionText: string | null; };