Don't switch to Retracted Items for single item from banner View button

Only for multiple items
This commit is contained in:
Dan Stillman 2019-06-12 23:46:22 -04:00
parent 45f6492494
commit ae7a262592

View file

@ -4800,13 +4800,15 @@ var ZoteroPane = new function()
link.textContent = Zotero.getString('retraction.alert.view.' + suffix);
link.onclick = async function () {
this.hideRetractionBanner();
var libraryID = this.getSelectedLibraryID();
// Select the Retracted Items collection
await this.collectionsView.selectByID("R" + libraryID);
// Select newly detected item if only one
if (items.length == 1) {
await this.selectItem(items[0].id);
}
// Otherwise select Retracted Items collection
else {
let libraryID = this.getSelectedLibraryID();
await this.collectionsView.selectByID("R" + libraryID);
}
}.bind(this);
close.onclick = function () {