mirror of
https://github.com/bulwarkmail/native.git
synced 2026-10-31 16:06:32 +00:00
Refreshing an open folder that was already loaded took up to four round trips in a row: `Email/queryChanges`, `Email/changes`, `Email/get` of the added and changed rows, and a `Thread/get` for their conversation sizes. They now go in one request, the `Email/get` of the added messages and the `Thread/get` of their threads chained by result reference to `/added/*/id` and `/list/*/threadId`. The list's own query and Email states still drive it. Each part can fail on its own: a query the server cannot diff falls back to the full re-query as before, an Email state it cannot diff is forgotten as before, and added messages the chained `Email/get` refused (more than one call takes) are fetched apart. Only further `Email/changes` pages and rows that changed in place without being re-added cost more requests.