fixes from review

This commit is contained in:
Lucas Gaitzsch
2026-05-22 13:13:13 +02:00
parent 159706a683
commit 5c1d59f38a
4 changed files with 26 additions and 13 deletions
+6 -1
View File
@@ -39,7 +39,7 @@ export function ProComposeTabBody({ tabId, data }: ProComposeTabBodyProps) {
const handleSend = useCallback(async (sendData: Parameters<NonNullable<React.ComponentProps<typeof EmailComposer>['onSend']>>[0]) => {
if (!client) return;
try {
await sendEmail(
const result = await sendEmail(
client,
sendData.to,
sendData.subject,
@@ -58,6 +58,11 @@ export function ProComposeTabBody({ tabId, data }: ProComposeTabBodyProps) {
sendData.envelopeMailFrom,
);
if (result.scheduled) {
closeTab(tabIdRef.current);
return;
}
// Mark the original message as $answered / $forwarded so the standard
// viewer and list reflect the action (same behaviour as inline compose).
if (data.sourceEmailId && (data.mode === 'reply' || data.mode === 'replyAll')) {