Build your personal knowledge base with Trilium Notes
TypeScript electronelectron-appknowledge-baseknowledge-graphknowledge-managementknowledge-management-graphlocal-firstnote-managmentnote-takernote-takingnotebooknotesnotes-apppersonal-knowledge-basepersonal-wikiscriptableself-hostedself-hostingwiki
fix(client): opening a new tab doesn't preserve view scope
Elian Doran0c9d1e91bb5d
diff --git a/apps/client/src/components/tab_manager.ts b/apps/client/src/components/tab_manager.tsindex 0416071c6a..71a7d77bdf 100644--- a/apps/client/src/components/tab_manager.ts+++ b/apps/client/src/components/tab_manager.ts@@ -600,18 +600,18 @@ export default class TabManager extends Component {}async moveTabToNewWindowCommand({ ntxId }: { ntxId: string }) {- const { notePath, hoistedNoteId } = this.getNoteContextById(ntxId);+ const { notePath, hoistedNoteId, viewScope } = this.getNoteContextById(ntxId);const removed = await this.removeNoteContext(ntxId);if (removed) {- this.triggerCommand("openInWindow", { notePath, hoistedNoteId });+ this.triggerCommand("openInWindow", { notePath, hoistedNoteId, viewScope });}}async copyTabToNewWindowCommand({ ntxId }: { ntxId: string }) {- const { notePath, hoistedNoteId } = this.getNoteContextById(ntxId);- this.triggerCommand("openInWindow", { notePath, hoistedNoteId });+ const { notePath, hoistedNoteId, viewScope } = this.getNoteContextById(ntxId);+ this.triggerCommand("openInWindow", { notePath, hoistedNoteId, viewScope });}async reopenLastTabCommand() {