Skip auto-sync on stream notification if library version is up to date
This avoids an extra no-op sync after an upload when the notification for the change comes back down from the streaming server.
This commit is contained in:
parent
baeb846b5c
commit
575968929c
|
@ -219,6 +219,11 @@ Zotero.Streamer_Module.prototype = {
|
||||||
let skipped = Zotero.Sync.Data.Local.getSkippedLibraries();
|
let skipped = Zotero.Sync.Data.Local.getSkippedLibraries();
|
||||||
if (skipped.includes(library.libraryID)) return;
|
if (skipped.includes(library.libraryID)) return;
|
||||||
|
|
||||||
|
if (data.version && data.version == library.libraryVersion) {
|
||||||
|
Zotero.debug("Library is already up to date");
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
await Zotero.Sync.Runner.sync({
|
await Zotero.Sync.Runner.sync({
|
||||||
background: true,
|
background: true,
|
||||||
libraries: [library.libraryID]
|
libraries: [library.libraryID]
|
||||||
|
|
Loading…
Reference in New Issue
Block a user