commit d67fd9fda2270af17cb6aa6bade501db757725b6
parent 01f04802f05da3c69d557d542f30bd9af286708d
Author: Dan Stillman <dstillman@zotero.org>
Date: Tue, 5 May 2015 15:54:20 -0400
Don't send add notifications for collections if skipNotifier is passed
Diffstat:
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
@@ -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