mirror of
https://github.com/Foundry376/Mailspring.git
synced 2025-01-12 19:23:13 +08:00
1a24840062
This commit will correctly keep track of folder and label ids when creating them from N1. Previously, when we sent the request to create a folder or label to our api, we would immediately get back a serverId because it was created optimistically in the back end— given that K2 is strictly non-optimistic, we won’t have a serverId until some undetermined time in the future, and we need to somehow reference the object that /was/ optimistically created in N1 to update the ui when we do get the server id. Since we can deterministically generate ids for folders and labels, we "guess" what its going to be, and include it in the props of the syncback request returned to N1. This is the simplest solution to get thing working correctly right now, but we’ll need to revisit this in the future for other types of objects (drafts, contacts, events), and revisit how we will manage optimistic updates in N1 when we merge the 2 codebases with K2 (given that K2 was designed to be non-optimisitc). |
||
---|---|---|
.. | ||
isomorphic-core | ||
local-sync |