courrier multi account restore compose

This commit is contained in:
alma 2025-04-28 20:58:41 +02:00
parent b62ae2d849
commit be119e02c6
2 changed files with 9 additions and 2 deletions

View File

@ -77,11 +77,14 @@ export default function EmailPanel({
// Handle different content structures
let content = '';
if (typeof email.content === 'string') {
if (email.formattedContent) {
// If we already have formatted content, use that
content = email.formattedContent;
} else if (typeof email.content === 'string') {
// Direct string content
content = email.content;
} else if (email.content && typeof email.content === 'object') {
// Object with text/html properties
// Object with text/html properties (new structure)
content = email.content.html || email.content.text || '';
} else {
// Fallback to html or text properties

View File

@ -114,12 +114,16 @@ export default function EmailPreview({ email, loading = false, onReply }: EmailP
let content = '';
if (email.formattedContent) {
// If we already have formatted content, use that
content = email.formattedContent;
} else if (typeof email.content === 'string') {
// Direct string content
content = email.content;
} else if (email.content && typeof email.content === 'object') {
// Object with text/html properties (new structure)
content = email.content.html || email.content.text || '';
} else {
// Fallback to html or text properties
content = email.html || email.text || '';
}