fix: let the reader go when a linked account has no folders to open the link in

This commit is contained in:
Linus Rath
2026-11-01 19:54:18 +01:00
parent 3b99ce26ae
commit a5d00dc0c5
+5 -1
View File
@@ -1961,7 +1961,11 @@ export function MailApp({ linkSegments: routeSegments }: MailAppProps = {}) {
useEffect(() => {
if (deepLinkHandledRef.current) return;
if (!isAuthenticated || !client) return;
if (mailboxes.length === 0) return;
if (mailboxes.length === 0) {
// The account has no folders to open the link in: stop holding the reader open for it.
if (initialMailLoadDone) setDeepLinkPane(null);
return;
}
if (!initialMailLoadDone) return;
const params = new URLSearchParams(initialSearchRef.current ?? window.location.search);