courrier multi account restore compose

This commit is contained in:
alma 2025-04-28 17:19:14 +02:00
parent 74dcb1b8ba
commit cc74bfc728

View File

@ -588,15 +588,24 @@ export default function CourrierPage() {
return;
}
// Update selected folders state without validation
// Use the exact folder name from the account's folders list
if (!account.folders.includes(folder)) {
console.warn(`Folder ${folder} not found in account ${accountId}`);
return;
}
// Update selected folders state
setSelectedFolders(prev => ({
...prev,
[accountId]: folder
}));
// Change to the selected folder
changeFolder(folder, accountId);
} else {
// For all accounts view, use the original folder name
changeFolder(folder, accountId);
}
// Change to the selected folder without additional validation
changeFolder(folder, accountId);
};
// Update the folder button rendering to show selected state based on account