From 37e850c67ba6893c3575f2dd6a3266a68f03acf9 Mon Sep 17 00:00:00 2001 From: Dan Stillman Date: Fri, 30 Mar 2018 01:55:04 -0400 Subject: [PATCH] Reopen targeted collection on window open if closed at save time (macOS) --- chrome/content/zotero/xpcom/server_connector.js | 15 +++++++++------ 1 file changed, 9 insertions(+), 6 deletions(-) diff --git a/chrome/content/zotero/xpcom/server_connector.js b/chrome/content/zotero/xpcom/server_connector.js index d7610a775..4c97aa05d 100644 --- a/chrome/content/zotero/xpcom/server_connector.js +++ b/chrome/content/zotero/xpcom/server_connector.js @@ -134,15 +134,18 @@ Zotero.Server.Connector.SaveSession.prototype.update = async function (libraryID // Select new destination in collections pane var win = Zotero.getActiveZoteroPane(); + if (collectionID) { + var targetID = "C" + collectionID; + } + else { + var targetID = "L" + libraryID; + } if (win && win.collectionsView) { - if (collectionID) { - var targetID = "C" + collectionID; - } - else { - var targetID = "L" + libraryID; - } await win.collectionsView.selectByID(targetID); } + else { + Zotero.Prefs.set('lastViewedFolder', targetID); + } await this._updateObjects(this._objects);