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}`);
|
console.log(`Changing folder to ${folder} for account ${accountId}`);
|
||||||
}
|
}
|
||||||
|
|
||||||
// Change folder in the state
|
// Change folder in the state, passing the accountId
|
||||||
changeFolder(folder);
|
changeFolder(folder, accountId);
|
||||||
setCurrentView(folder);
|
setCurrentView(folder);
|
||||||
|
|
||||||
// Start prefetching additional pages for this folder
|
// Start prefetching additional pages for this folder
|
||||||
|
|||||||
@ -538,10 +538,11 @@ export const useCourrier = () => {
|
|||||||
setSelectedEmail(null);
|
setSelectedEmail(null);
|
||||||
setSelectedEmailIds([]);
|
setSelectedEmailIds([]);
|
||||||
|
|
||||||
// Load the emails for this folder
|
// Load the emails for this folder with the correct accountId
|
||||||
// The loadEmails function will be called by the useEffect above
|
if (session?.user?.id) {
|
||||||
// due to the dependency on currentFolder
|
loadEmails(false, accountId);
|
||||||
}, []);
|
}
|
||||||
|
}, [session?.user?.id, loadEmails]);
|
||||||
|
|
||||||
// Search emails
|
// Search emails
|
||||||
const searchEmails = useCallback((query: string) => {
|
const searchEmails = useCallback((query: string) => {
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user