Mailspring/packages/local-sync
Juan Tejada 1a24840062 [local-sync] Correctly sync folders and labels
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).
2016-12-05 18:56:36 -08:00
..
images [dashboard] Put dashboard into work window 2016-11-28 18:02:42 -08:00
spec [local-sync] fix(folder-list): Support children when parent has no attribs 2016-12-05 16:20:17 -08:00
src [local-sync] Correctly sync folders and labels 2016-12-05 18:56:36 -08:00
stylesheets [💄] fix eslint issues before they get overwhelming 2016-12-01 15:37:48 -08:00
main.es6 [dashboard] Put dashboard into work window 2016-11-28 18:02:42 -08:00
package.json [local-sync] fix(specs): New specs for threading 2016-12-05 15:00:37 -08:00