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
1 changed files with 5 additions and 0 deletions
|
@ -219,6 +219,11 @@ Zotero.Streamer_Module.prototype = {
|
|||
let skipped = Zotero.Sync.Data.Local.getSkippedLibraries();
|
||||
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({
|
||||
background: true,
|
||||
libraries: [library.libraryID]
|
||||
|
|
Loading…
Add table
Reference in a new issue