mirror of
https://github.com/bulwarkmail/webmail.git
synced 2026-10-31 16:13:15 +00:00
fetchEmails sent a unified/cross view's client-only virtual mailbox id (__cross_all__ / __unified_*) straight to getEmails as `inMailbox`. The server rejects it (Stalwart: "filter.inMailbox = '__cross_all__'") and the foreground catch wiped the list to "no messages found" - notably after actions (mark read, delete, move) in the aggregated views. Mirror the loadMoreEmails / refreshCurrentMailbox guard: when the target id is virtual, fan out via fetchCrossViewEmails / fetchUnifiedEmails (search-aware) at page 0 instead of querying the virtual id. If the view state isn't resolved yet, stop loading without sending the id or wiping the list. Real folders are unaffected. +5 unit tests (email-store-fetch-unified): cross/unified fan-out, explicit virtual-id arg, unresolved-view no-op, and the real-folder path still using getEmails. tsc + eslint clean; all store suites green (389).