mail page imap connection mime 5 bis rest 7

This commit is contained in:
alma 2025-04-15 23:01:11 +02:00
parent e013913f4d
commit 0c5b9364dc

View File

@ -491,7 +491,9 @@ export default function MailPage() {
// Filter emails based on current view
const filteredEmails = emails.filter(email => {
if (selectedAccount === 0) return true;
return email.accountId === selectedAccount.toString();
// Use the email address to match instead of accountId
const selectedAccountEmail = accounts.find(acc => acc.id === selectedAccount)?.email;
return email.from === selectedAccountEmail || email.to === selectedAccountEmail;
}).filter(email => {
switch (currentView) {
case "inbox":