www

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

commit 1b6dffb88640f1624c3a905dc520883fda5be082
parent cd3f621a00a7eaf50ceca3efffdd69fab25f5ed8
Author: Dan Stillman <dstillman@zotero.org>
Date:   Tue, 12 Jul 2016 03:23:47 -0400

Don't refresh collections pane when updating library last-sync times

Diffstat:
Mchrome/content/zotero/xpcom/data/feed.js | 4+++-
Mchrome/content/zotero/xpcom/data/group.js | 4+++-
Mchrome/content/zotero/xpcom/data/library.js | 2+-
Mchrome/content/zotero/xpcom/sync/syncEngine.js | 13++++++++++---
4 files changed, 17 insertions(+), 6 deletions(-)

diff --git a/chrome/content/zotero/xpcom/data/feed.js b/chrome/content/zotero/xpcom/data/feed.js @@ -280,7 +280,9 @@ Zotero.Feed.prototype._saveData = Zotero.Promise.coroutine(function* (env) { params.push(this.libraryID); yield Zotero.DB.queryAsync(sql, params); - Zotero.Notifier.queue('modify', 'feed', this.libraryID, env.options.notifierQueue); + if (!env.options.skipNotifier) { + Zotero.Notifier.queue('modify', 'feed', this.libraryID, env.options.notifierQueue); + } } else { Zotero.debug("Feed data did not change for feed " + this.libraryID, 5); diff --git a/chrome/content/zotero/xpcom/data/group.js b/chrome/content/zotero/xpcom/data/group.js @@ -204,7 +204,9 @@ Zotero.Group.prototype._saveData = Zotero.Promise.coroutine(function* (env) { params.push(this.groupID); yield Zotero.DB.queryAsync(sql, params); - Zotero.Notifier.queue('modify', 'group', this.groupID); + if (!env.options.skipNotifier) { + Zotero.Notifier.queue('modify', 'group', this.groupID); + } } else { Zotero.debug("Group data did not change for group " + this.groupID, 5); diff --git a/chrome/content/zotero/xpcom/data/library.js b/chrome/content/zotero/xpcom/data/library.js @@ -520,7 +520,7 @@ Zotero.Library.prototype._saveData = Zotero.Promise.coroutine(function* (env) { // Since these are Zotero.Library properties, the 'modify' for the inheriting object may not // get triggered, so call it here too - if (this.libraryType != 'user') { + if (!env.options.skipNotifier && this.libraryType != 'user') { Zotero.Notifier.queue('modify', this.libraryType, this.libraryTypeID); } } else { diff --git a/chrome/content/zotero/xpcom/sync/syncEngine.js b/chrome/content/zotero/xpcom/sync/syncEngine.js @@ -166,7 +166,10 @@ Zotero.Sync.Data.Engine.prototype.start = Zotero.Promise.coroutine(function* () } } - yield Zotero.Libraries.updateLastSyncTime(this.libraryID); + this.library.updateLastSyncTime(); + yield this.library.saveTx({ + skipNotifier: true + }); Zotero.debug("Done syncing " + this.library.name); }); @@ -850,7 +853,9 @@ Zotero.Sync.Data.Engine.prototype._uploadSettings = Zotero.Promise.coroutine(fun libraryVersion ); this.library.libraryVersion = libraryVersion; - yield this.library.saveTx(); + yield this.library.saveTx({ + skipNotifier: true + }); Zotero.debug("Done uploading settings in " + this.library.name); return libraryVersion; @@ -1053,7 +1058,9 @@ Zotero.Sync.Data.Engine.prototype._uploadDeletions = Zotero.Promise.coroutine(fu // Update library version this.library.libraryVersion = libraryVersion; - yield this.library.saveTx(); + yield this.library.saveTx({ + skipNotifier: true + }); // Remove successful deletions from delete log yield Zotero.Sync.Data.Local.removeObjectsFromDeleteLog(