Don't send add notifications for collections if skipNotifier is passed

This commit is contained in:
Dan Stillman 2015-05-05 15:54:20 -04:00
parent 01f04802f0
commit d67fd9fda2

View file

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