refactor: unify mail display with shared ThreadTile widget (#445)

This commit was merged in pull request #445.
This commit is contained in:
Bot of Thomas Güttler
2026-06-05 19:06:29 +02:00
parent 3bd404f0cf
commit bcece9f0af
6 changed files with 154 additions and 15 deletions
+16
View File
@@ -192,6 +192,22 @@ class EmailThread {
required this.accountId,
required this.mailboxPath,
});
/// Wraps a single [Email] as a one-message thread for uniform rendering.
factory EmailThread.fromEmail(Email e) => EmailThread(
threadId: e.threadId ?? e.id,
subject: e.subject,
participants: e.from,
latestDate: e.sentAt ?? e.receivedAt,
messageCount: 1,
hasUnread: !e.isSeen,
isFlagged: e.isFlagged,
latestEmailId: e.id,
preview: e.preview,
emailIds: [e.id],
accountId: e.accountId,
mailboxPath: e.mailboxPath,
);
}
class EmailAddress {