Skip to content

Commit

Permalink
Don't select items in trash on target selector change
Browse files Browse the repository at this point in the history
Items in the trash will still be updated properly (since they can still
exist in collections and have tags), but the collection selected in the
target selector should remain selected in the client.

Addresses zotero/zotero-connectors#220
  • Loading branch information
dstillman committed Mar 29, 2018
1 parent 00d85fb commit a4aabd9
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion chrome/content/zotero/xpcom/server_connector.js
Expand Up @@ -151,7 +151,10 @@ Zotero.Server.Connector.SaveSession.prototype.update = async function (libraryID
if (this._objects.item.size == 1) {
let item = Array.from(this._objects.item)[0];
item = item.isTopLevelItem() ? item : item.parentItem;
await win.selectItem(item.id);
// Don't select if in trash
if (!item.deleted) {
await win.selectItem(item.id);
}
}
}
}
Expand Down

0 comments on commit a4aabd9

Please sign in to comment.