From 3a2cd70684f319e6e830dc6b6b801fe0545ed093 Mon Sep 17 00:00:00 2001 From: abaevbog Date: Tue, 6 Feb 2024 02:23:09 -0500 Subject: [PATCH] update tab when collection row is updated (#3673) When saved search, collection or feed is renamed, update the zotero-pane tab so that it has the new title. Fixes: #3664 --- chrome/content/zotero/collectionTree.jsx | 1 + chrome/content/zotero/zoteroPane.js | 2 ++ 2 files changed, 3 insertions(+) diff --git a/chrome/content/zotero/collectionTree.jsx b/chrome/content/zotero/collectionTree.jsx index a9b422af89..8da58d4e81 100644 --- a/chrome/content/zotero/collectionTree.jsx +++ b/chrome/content/zotero/collectionTree.jsx @@ -252,6 +252,7 @@ var CollectionTree = class CollectionTree extends LibraryTree { treeRow.ref.name = treeRow.editingName; delete treeRow.editingName; await treeRow.ref.saveTx(); + window.Zotero_Tabs.rename("zotero-pane", treeRow.ref.name); } startEditing = (treeRow) => { diff --git a/chrome/content/zotero/zoteroPane.js b/chrome/content/zotero/zoteroPane.js index ef88bd5fa1..c344784565 100644 --- a/chrome/content/zotero/zoteroPane.js +++ b/chrome/content/zotero/zoteroPane.js @@ -2665,6 +2665,7 @@ var ZoteroPane = new function() if (io.dataOut) { row.ref.fromJSON(io.dataOut.json); yield row.ref.saveTx(); + Zotero_Tabs.rename("zotero-pane", row.ref.name); } } } @@ -2708,6 +2709,7 @@ var ZoteroPane = new function() feed.cleanupReadAfter = data.cleanupReadAfter; feed.cleanupUnreadAfter = data.cleanupUnreadAfter; yield feed.saveTx(); + Zotero_Tabs.rename("zotero-pane", feed.name); }); this.refreshFeed = function() {