Skip to content

Commit

Permalink
更新传递参数为regularItems
Browse files Browse the repository at this point in the history
  • Loading branch information
redleafnew committed Jul 13, 2023
1 parent 5a389db commit d650ffd
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 5 deletions.
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "greenfrog",
"version": "0.14.01",
"version": "0.14.02",
"description": "Zotero plugin for update journal information from easyScholar",
"config": {
"addonName": "Green Frog",
Expand Down
2 changes: 1 addition & 1 deletion src/hooks.ts
Original file line number Diff line number Diff line change
Expand Up @@ -129,7 +129,7 @@ async function onNotify(

if (regularItems.length !== 0) {
// await KeyExampleFactory.setExtra(regularItems);
BasicExampleFactory.exampleNotifierCallback(ids)
BasicExampleFactory.exampleNotifierCallback(regularItems)
return;
}
//Zotero.debug(`添加条目了${ids}!`)
Expand Down
6 changes: 3 additions & 3 deletions src/modules/examples.ts
Original file line number Diff line number Diff line change
Expand Up @@ -62,14 +62,14 @@ export class BasicExampleFactory {
}

@example
static async exampleNotifierCallback(ids: any) {
static async exampleNotifierCallback(regularItems: any) {
// 增加条目时 新增条目时
// Zotero.Items.get(ids).filter(item => item.isRegularItem())
var items = Zotero.Items.get(ids);
// var items = Zotero.Items.get(ids);
// 增加条目时 更新
var addUpdate = Zotero.Prefs.get(`extensions.zotero.${config.addonRef}.add.update`, true);
if (addUpdate) {
await KeyExampleFactory.setExtra(items);
await KeyExampleFactory.setExtra(regularItems);
}
// 得到添加的条目总数
// var items = Zotero.Items.get(ids);
Expand Down

0 comments on commit d650ffd

Please sign in to comment.