Don't sync group on push notification if not selected for syncing

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.)
This commit is contained in:
Dan Stillman 2021-01-09 14:56:45 -05:00
parent a1267bc68e
commit 7b9bad1d52

View file

@ -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");