courrier multi account restore compose
This commit is contained in:
parent
d838cb9db9
commit
445c90e852
@ -218,14 +218,15 @@ export const useCourrier = () => {
|
||||
setIsLoading(false);
|
||||
|
||||
// Still refresh in background for fresh data
|
||||
// CRITICAL FIX: Use the same effective account ID for background refresh
|
||||
console.log(`Starting background refresh with folder ${currentFolder}, account ${effectiveAccountId}`);
|
||||
// CRITICAL FIX: Use the normalized folder and explicit account ID together for background refresh
|
||||
// This prevents issues with account switching where the wrong folder prefix remains
|
||||
console.log(`Starting background refresh with normalized folder=${normalizedFolder}, account=${effectiveAccountId}`);
|
||||
refreshEmailsInBackground(
|
||||
session.user.id,
|
||||
currentFolder,
|
||||
normalizedFolder, // CRITICAL FIX: Use the normalized folder WITHOUT prefix
|
||||
currentRequestPage,
|
||||
perPage,
|
||||
effectiveAccountId // Always use the effective account ID
|
||||
effectiveAccountId // Always pass the effective account ID explicitly
|
||||
).catch(err => {
|
||||
console.error('Background refresh error:', err);
|
||||
});
|
||||
|
||||
Loading…
Reference in New Issue
Block a user