From 7b9bad1d52c2d400d3e533173fec66b05057a8df Mon Sep 17 00:00:00 2001 From: Dan Stillman Date: Sat, 9 Jan 2021 14:56:45 -0500 Subject: [PATCH] Don't sync group on push notification if not selected for syncing MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit If a group library was deselected in the "Choose Libraries…" window, a remote change would still trigger a sync if auto-sync was enabled. (My Library was not affected.) --- chrome/content/zotero/xpcom/streamer.js | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/chrome/content/zotero/xpcom/streamer.js b/chrome/content/zotero/xpcom/streamer.js index f6230f2485..22059033e8 100644 --- a/chrome/content/zotero/xpcom/streamer.js +++ b/chrome/content/zotero/xpcom/streamer.js @@ -216,8 +216,10 @@ Zotero.Streamer_Module.prototype = { let library = Zotero.URI.getPathLibrary(data.topic); if (library) { // Ignore if skipped library - let skipped = Zotero.Sync.Data.Local.getSkippedLibraries(); - if (skipped.includes(library.libraryID)) return; + if (!Zotero.Sync.Data.Local.filterSkippedLibraries([library]).length) { + Zotero.debug("Library not selected for syncing -- skipping"); + return; + } if (data.version && data.version == library.libraryVersion) { Zotero.debug("Library is already up to date");