Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Content loss after merge of local and remote change #68

Open
roundhill opened this issue Nov 2, 2018 · 0 comments
Open

Content loss after merge of local and remote change #68

roundhill opened this issue Nov 2, 2018 · 0 comments
Labels

Comments

@roundhill
Copy link
Contributor

Refs: Automattic/simplenote-android#560 (comment)

Merging two diffs with an object doesn't appear to be working correctly. Here's some sample data, in this case the text After is deleted.

remote change:

{"content":{"o":"d","v":"=16\t-7\t+placed"},"modificationDate":{"o":"r","v":1541173714}}

localModifications:

{"content":{"o":"d","v":"=14\t+Before%0A\t=9\t+%0AAfter"},"modificationDate":{"o":"r","v":1541116216}}

transformed:

{"modificationDate":{"o":"r","v":1541116216},"content":{"o":"d","v":"=14\t+Before%0A\t=8"}}

original object:

{"tags":[],"deleted":false,"shareURL":"","systemTags":["markdown"],"content":"Line 1\nLine 2\nRemove me","publishURL":"","modificationDate":1541116180,"creationDate":1541116168.779}

updated object:

{"tags":[],"deleted":false,"shareURL":"","systemTags":["markdown"],"content":"Line 1\nLine 2\nBefore\nReplaced","publishURL":"","modificationDate":1541116216,"creationDate":1541116168.779}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

1 participant