1
0
mirror of https://github.com/Jermolene/TiddlyWiki5 synced 2024-11-30 05:19:57 +00:00

Fix broken updating of last_known_tiddler_id from streamed data

This commit is contained in:
Jeremy Ruston 2024-03-26 12:25:49 +00:00
parent 8a2111f150
commit baee0bb301

View File

@ -180,10 +180,10 @@ MultiWikiClientAdaptor.prototype.connectServerStream = function(options) {
const data = $tw.utils.parseJSONSafe(event.data);
if(data) {
console.log("SSE data",data)
if(data.tiddler_id > self.last_known_tiddler_id) {
self.last_known_tiddler_id = data.tiddler_id;
}
if(data.is_deleted) {
if(data.tiddler_id > self.last_known_tiddler_id) {
self.last_known_tiddler_id = data.tiddler_id;
}
self.removeTiddlerInfo(data.title);
delete options.syncer.tiddlerInfo[data.title];
options.syncer.logger.log("Deleting tiddler missing from server:",data.title);