feat: use email 'Date' header for statistics and search filtering #87

This commit is contained in:
rustmailer
2025-12-30 22:21:53 +08:00
parent fb0be8c5d1
commit 7fb6575f8d
4 changed files with 15 additions and 15 deletions
+2 -2
View File
@@ -113,13 +113,13 @@ export function MailThreadDialog({ open, onOpenChange }: MailThreadDialogProps)
)}
{allMessages
.sort((a, b) => a.internal_date - b.internal_date)
.sort((a, b) => a.date - b.date)
.map((msg) => {
const isExpanded = expandedIds.has(msg.id);
const preview =
msg.text?.slice(0, 120) +
(msg.text?.length > 120 ? '...' : '');
const date = new Date(msg.internal_date);
const date = new Date(msg.date);
const formattedDate = isNaN(date.getTime())
? t('search.thread.invalidDate')
: format(date, 'yyyy-MM-dd HH:mm:ss');