TiddlyWiki5 icon indicating copy to clipboard operation
TiddlyWiki5 copied to clipboard

Add a mechanism allowing the sync adaptor to notify the syncer of changes

Open Arlen22 opened this issue 7 years ago • 1 comments

This PR adds a mechanism allowing the sync adapter to notify the syncer of change notifications from the server as they happen. I have added the skeleton code to the filesystem and tiddlyweb adapters, and implemented the handling code in syncer.js.

The sync adapter emits a server-update event with type and tiddlerfields (a skinny tiddler) arguments whenever it feels like it. The syncer then handles the event as it would a normal skinny tiddler.

I've also added a delete tiddler mechanism but it is incomplete and someone needs to make sure it works correctly. This all needs testing -- I haven't even tested it yet myself. But I got the idea and it seemed simple, so I did it. This didn't take very long to put together.

Update: I removed the delete tiddler mechanism. It will only use the server-update event.

Arlen22 avatar Apr 25 '18 16:04 Arlen22

There is an issue that should be linked to this PR

danielo515 avatar Apr 26 '18 06:04 danielo515