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:
parent
8a2111f150
commit
baee0bb301
@ -180,10 +180,10 @@ MultiWikiClientAdaptor.prototype.connectServerStream = function(options) {
|
|||||||
const data = $tw.utils.parseJSONSafe(event.data);
|
const data = $tw.utils.parseJSONSafe(event.data);
|
||||||
if(data) {
|
if(data) {
|
||||||
console.log("SSE data",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.is_deleted) {
|
||||||
if(data.tiddler_id > self.last_known_tiddler_id) {
|
|
||||||
self.last_known_tiddler_id = data.tiddler_id;
|
|
||||||
}
|
|
||||||
self.removeTiddlerInfo(data.title);
|
self.removeTiddlerInfo(data.title);
|
||||||
delete options.syncer.tiddlerInfo[data.title];
|
delete options.syncer.tiddlerInfo[data.title];
|
||||||
options.syncer.logger.log("Deleting tiddler missing from server:",data.title);
|
options.syncer.logger.log("Deleting tiddler missing from server:",data.title);
|
||||||
|
Loading…
Reference in New Issue
Block a user