fix: note tab session record

fix: #1265
This commit is contained in:
windingwind 2025-01-19 14:25:35 +01:00
parent 719be35dca
commit 5851b95ff1
2 changed files with 8 additions and 0 deletions

View File

@ -141,6 +141,13 @@ async function onNotify(
if (extraData?.skipBN) { if (extraData?.skipBN) {
return; return;
} }
if (
["add", "close"].includes(event) &&
type === "tab" &&
extraData[ids[0]]?.type === "note"
) {
Zotero.Session.debounceSave();
}
if (event === "select" && type === "tab") { if (event === "select" && type === "tab") {
onTabSelect(extraData[ids[0]].type); onTabSelect(extraData[ids[0]].type);
} }

View File

@ -70,6 +70,7 @@ export async function restoreNoteTabs() {
select: !!tab.selected, select: !!tab.selected,
}); });
} }
Zotero.Session.debounceSave();
} }
export function onUpdateNoteTabsTitle(noteItems: Zotero.Item[]) { export function onUpdateNoteTabsTitle(noteItems: Zotero.Item[]) {