courrier multi account restore compose

This commit is contained in:
alma 2025-04-28 14:43:39 +02:00
parent 795a9f4629
commit c102b6e89b
2 changed files with 7 additions and 6 deletions

View File

@ -507,8 +507,8 @@ export default function CourrierPage() {
console.log(`Changing folder to ${folder} for account ${accountId}`);
}
// Change folder in the state
changeFolder(folder);
// Change folder in the state, passing the accountId
changeFolder(folder, accountId);
setCurrentView(folder);
// Start prefetching additional pages for this folder

View File

@ -538,10 +538,11 @@ export const useCourrier = () => {
setSelectedEmail(null);
setSelectedEmailIds([]);
// Load the emails for this folder
// The loadEmails function will be called by the useEffect above
// due to the dependency on currentFolder
}, []);
// Load the emails for this folder with the correct accountId
if (session?.user?.id) {
loadEmails(false, accountId);
}
}, [session?.user?.id, loadEmails]);
// Search emails
const searchEmails = useCallback((query: string) => {