mirror of
https://github.com/zotero/zotero.git
synced 2026-08-28 05:25:31 +00:00
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:
parent
ff93139cce
commit
b6efbe880e
1 changed files with 3 additions and 4 deletions
|
|
@ -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);
|
||||
}
|
||||
};
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue