From d67fd9fda2270af17cb6aa6bade501db757725b6 Mon Sep 17 00:00:00 2001 From: Dan Stillman Date: Tue, 5 May 2015 15:54:20 -0400 Subject: [PATCH] Don't send add notifications for collections if skipNotifier is passed --- chrome/content/zotero/xpcom/data/collection.js | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) diff --git a/chrome/content/zotero/xpcom/data/collection.js b/chrome/content/zotero/xpcom/data/collection.js index 6aa1deecd..866f455cd 100644 --- a/chrome/content/zotero/xpcom/data/collection.js +++ b/chrome/content/zotero/xpcom/data/collection.js @@ -360,11 +360,13 @@ Zotero.Collection.prototype._finalizeSave = Zotero.Promise.coroutine(function* ( group.clearCollectionCache(); } - if (isNew) { - Zotero.Notifier.trigger('add', 'collection', this.id, env.notifierData); - } - else if (!env.options.skipNotifier) { - Zotero.Notifier.trigger('modify', 'collection', this.id, env.notifierData); + if (!env.options.skipNotifier) { + if (isNew) { + Zotero.Notifier.trigger('add', 'collection', this.id, env.notifierData); + } + else { + Zotero.Notifier.trigger('modify', 'collection', this.id, env.notifierData); + } } // Invalidate cached child collections