diff --git a/web/EmailList.tsx b/web/EmailList.tsx index afe4dd2..2999737 100644 --- a/web/EmailList.tsx +++ b/web/EmailList.tsx @@ -219,36 +219,49 @@ export const EmailList = () => { const hasNoEmails = !isSearching && total === 0 && folder === 'inbox' && !allCount?.total; if (hasNoEmails && !isLoading && page === 1) { return ( -
- - {!hasAccounts ? ( -
- Add an email account to get started - -
- ) : syncableAccount ? ( -
+ <> + {/* + The modal has to be mounted HERE too, not only in the main return below. + + It was only down there, and the result was a catch-22 you could not get out of: with no account + the component takes this early return, "Add Account" flips the shared `EMAIL_ACCOUNTS_OPEN` + global — and nothing is listening, because `` lives in the branch that renders + when mail EXISTS. Clicking it did nothing at all, with no error anywhere. The only other trigger + is in the toolbar, which is also in that branch, so a fresh install had no reachable way to add + the first account. + */} + +
+ + {!hasAccounts ? ( +
+ Add an email account to get started + +
+ ) : syncableAccount ? ( +
+ No emails synced yet + +
+ ) : isSyncing ? ( +
+ + Syncing emails... +
+ ) : ( No emails synced yet - -
- ) : isSyncing ? ( -
- - Syncing emails... -
- ) : ( - No emails synced yet - )} -
+ )} +
+ ); }