commit 943b2c1ddf65130f90c020453b9bb6b69c689da4
parent 7aa6d98f35c64f4fa658875d8b3cb2bb5207ba47
Author: Dan Stillman <dstillman@zotero.org>
Date: Fri, 1 Apr 2016 05:47:43 -0400
Don't auto-sync on feed library changes, and add Zotero.Library::syncable
Diffstat:
2 files changed, 11 insertions(+), 1 deletion(-)
diff --git a/chrome/content/zotero/xpcom/data/library.js b/chrome/content/zotero/xpcom/data/library.js
@@ -148,6 +148,12 @@ Zotero.defineProperty(Zotero.Library.prototype, 'libraryVersion', {
set: function(v) this._set('_libraryVersion', v)
});
+
+Zotero.defineProperty(Zotero.Library.prototype, 'syncable', {
+ get: function () { return this._libraryType != 'feed'; }
+});
+
+
Zotero.defineProperty(Zotero.Library.prototype, 'lastSync', {
get: function() this._get('_libraryLastSync')
});
diff --git a/chrome/content/zotero/xpcom/sync/syncEventListeners.js b/chrome/content/zotero/xpcom/sync/syncEventListeners.js
@@ -134,12 +134,16 @@ Zotero.Sync.EventListeners.AutoSyncListener = {
let objectsClass = Zotero.DataObjectUtilities.getObjectsClassForObjectType(type);
ids.forEach(id => {
let lk = objectsClass.getLibraryAndKeyFromID(id);
- if (lk) {
+ if (lk && Zotero.Libraries.get(lk.libraryID).syncable) {
libraryIDs.add(lk.libraryID);
}
});
}
+ if (!libraryIDs.size) {
+ return;
+ }
+
Zotero.Sync.Runner.setSyncTimeout(
this._editTimeout,
false,