courrier multi account restore compose
This commit is contained in:
parent
795a9f4629
commit
c102b6e89b
@ -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
|
||||
|
||||
@ -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) => {
|
||||
|
||||
Loading…
Reference in New Issue
Block a user