courrier multi account restore compose
This commit is contained in:
parent
d1a873dcea
commit
55cdee80a0
@ -576,14 +576,20 @@ export default function CourrierPage() {
|
||||
const handleMailboxChange = (folder: string, accountId?: string) => {
|
||||
if (accountId && accountId !== 'all-accounts') {
|
||||
const account = accounts.find(a => a.id === accountId);
|
||||
if (!account?.folders?.includes(folder)) {
|
||||
folder = 'INBOX'; // Fallback to INBOX if folder doesn't exist
|
||||
|
||||
if (!account) {
|
||||
console.warn(`Account ${accountId} not found`);
|
||||
return;
|
||||
}
|
||||
|
||||
// Update selected folders state without validation
|
||||
setSelectedFolders(prev => ({
|
||||
...prev,
|
||||
[accountId]: folder
|
||||
}));
|
||||
}
|
||||
|
||||
// Change to the selected folder without additional validation
|
||||
changeFolder(folder, accountId);
|
||||
};
|
||||
|
||||
|
||||
Loading…
Reference in New Issue
Block a user