how to force recalculation of Duplicate Items
I've customized my local client build with an option
to require all items in each duplicate group to have the same item type.
I'm using the code below in chrome/content/zotero/zoteroPane.js
It works but momentarily displays Unfiled Items.
This is jarring, especially when Unfiled Items is close in content to Duplicate Items
-- making it hard to know sometimes when the operation is complete.
this.setVirtual(this.getSelectedLibraryID(), 'duplicates', false, false);
Zotero.Prefs.set('duplicates.separateItemTypes', true); // or false
setTimeout( (function() {
this.setVirtual(this.getSelectedLibraryID(), 'duplicates', true, true);
}).bind(this), 100);
This code didn't work for me before adding the imposed delay, and
I couldn't find a more direct Zotero Javascript API call, or XUL or React way.
Can I do better than this?
to require all items in each duplicate group to have the same item type.
I'm using the code below in chrome/content/zotero/zoteroPane.js
It works but momentarily displays Unfiled Items.
This is jarring, especially when Unfiled Items is close in content to Duplicate Items
-- making it hard to know sometimes when the operation is complete.
this.setVirtual(this.getSelectedLibraryID(), 'duplicates', false, false);
Zotero.Prefs.set('duplicates.separateItemTypes', true); // or false
setTimeout( (function() {
this.setVirtual(this.getSelectedLibraryID(), 'duplicates', true, true);
}).bind(this), 100);
This code didn't work for me before adding the imposed delay, and
I couldn't find a more direct Zotero Javascript API call, or XUL or React way.
Can I do better than this?