Skip to content

Commit

Permalink
fix: note tab session record
Browse files Browse the repository at this point in the history
fix: #1265
  • Loading branch information
windingwind committed Jan 19, 2025
1 parent 719be35 commit 5851b95
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 0 deletions.
7 changes: 7 additions & 0 deletions src/hooks.ts
Original file line number Diff line number Diff line change
Expand Up @@ -141,6 +141,13 @@ async function onNotify(
if (extraData?.skipBN) {
return;
}
if (
["add", "close"].includes(event) &&
type === "tab" &&
extraData[ids[0]]?.type === "note"
) {
Zotero.Session.debounceSave();
}
if (event === "select" && type === "tab") {
onTabSelect(extraData[ids[0]].type);
}
Expand Down
1 change: 1 addition & 0 deletions src/modules/workspace/tab.ts
Original file line number Diff line number Diff line change
Expand Up @@ -70,6 +70,7 @@ export async function restoreNoteTabs() {
select: !!tab.selected,
});
}
Zotero.Session.debounceSave();
}

export function onUpdateNoteTabsTitle(noteItems: Zotero.Item[]) {
Expand Down

0 comments on commit 5851b95

Please # to comment.