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
This commit is contained in:
abaevbog 2024-02-06 02:23:09 -05:00 committed by GitHub
parent 42a994cce1
commit 3a2cd70684
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
2 changed files with 3 additions and 0 deletions

View file

@ -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) => {

View file

@ -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() {