www

Unnamed repository; edit this file 'description' to name the repository.
Log | Files | Refs | Submodules | README | LICENSE

commit 575968929cf9d67afbd622596216d0684e77a3b9
parent baeb846b5ce8797076211fe11a23e901bfa17269
Author: Dan Stillman <dstillman@zotero.org>
Date:   Mon, 27 Nov 2017 19:46:30 -0500

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.

Diffstat:
Mchrome/content/zotero/xpcom/streamer.js | 5+++++
1 file changed, 5 insertions(+), 0 deletions(-)

diff --git a/chrome/content/zotero/xpcom/streamer.js b/chrome/content/zotero/xpcom/streamer.js @@ -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]