Pass save options through in Zotero.Collection::removeItems()

addItems() passes its options to Zotero.Item::save(), but removeItems()
dropped everything but skipEditCheck, so callers couldn't batch the
resulting notifications.
This commit is contained in:
Dan Stillman 2026-08-23 12:08:58 -04:00
parent ff93139cce
commit b6efbe880e

View file

@ -456,6 +456,8 @@ Zotero.Collection.prototype.removeItem = function (itemID, options = {}) {
* Does not require a separate save()
*/
Zotero.Collection.prototype.removeItems = async function (itemIDs, options = {}) {
options.skipDateModifiedUpdate = true;
if (!itemIDs || !itemIDs.length) {
return;
}
@ -473,10 +475,7 @@ Zotero.Collection.prototype.removeItems = async function (itemIDs, options = {})
let item = await this.ChildObjects.getAsync(itemID);
item.removeFromCollection(this.id);
await item.save({
skipDateModifiedUpdate: true,
skipEditCheck: options.skipEditCheck
})
await item.save(options);
}
};