Don't auto-sync on feed library changes, and add Zotero.Library::syncable

This commit is contained in:
Dan Stillman 2016-04-01 05:47:43 -04:00
parent 7aa6d98f35
commit 943b2c1ddf
2 changed files with 11 additions and 1 deletions

View File

@ -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')
});

View File

@ -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,