mirror of
https://github.com/bulwarkmail/native.git
synced 2026-10-31 16:06:32 +00:00
A contact's rows are written in one provider batch, and one batch is one Binder transaction of at most 1 MB. A contact with a larger photo failed with `tooLarge` on every run, stayed on `stale`, never showed on the device, and its device edits never uploaded. Photos above about 512 KiB are now kept on the server only: the contact is written without the photo. The shadow records that the device holds no row for the card's photo, so the missing row is not read as a deletion. The same applies to a photo whose bytes could not be fetched, which an unrelated edit of the contact used to delete from the server. A photo set on the device still replaces the server's, and one deleted there is still deleted on the server. Checked with planner tests for the insert, the size limit, a photo that could not be fetched and a merge, and end to end through the engine with the probe's 900 KB photo.