fix toolbar re-render when opening emails

This commit is contained in:
Max Hao
2026-06-16 15:48:50 +02:00
committed by Linus Rath
parent c0ca6d3102
commit 4f1390fdeb
2 changed files with 20 additions and 19 deletions
+3 -4
View File
@@ -2273,11 +2273,10 @@ export default function Home() {
setShowComposer(false);
}
// waiting for the body fetch - avoids the loading flicker.
// Find the list-level email for metadata (accountId, scheduled flags, etc.)
// but don't select it yet — wait for the full fetch to avoid a toolbar flash
// caused by rendering with the stub (no bodyValues) then re-rendering with the full email.
const listEmail = activeEmails.find(e => e.id === email.id);
if (listEmail) {
selectEmail(listEmail);
}
setLoadingEmail(true);