mirror of
https://github.com/zadam/trilium.git
synced 2025-11-03 03:46:37 +01:00
fix(client): opening a new tab doesn't preserve view scope
This commit is contained in:
@@ -600,18 +600,18 @@ export default class TabManager extends Component {
|
|||||||
}
|
}
|
||||||
|
|
||||||
async moveTabToNewWindowCommand({ ntxId }: { ntxId: string }) {
|
async moveTabToNewWindowCommand({ ntxId }: { ntxId: string }) {
|
||||||
const { notePath, hoistedNoteId } = this.getNoteContextById(ntxId);
|
const { notePath, hoistedNoteId, viewScope } = this.getNoteContextById(ntxId);
|
||||||
|
|
||||||
const removed = await this.removeNoteContext(ntxId);
|
const removed = await this.removeNoteContext(ntxId);
|
||||||
|
|
||||||
if (removed) {
|
if (removed) {
|
||||||
this.triggerCommand("openInWindow", { notePath, hoistedNoteId });
|
this.triggerCommand("openInWindow", { notePath, hoistedNoteId, viewScope });
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
async copyTabToNewWindowCommand({ ntxId }: { ntxId: string }) {
|
async copyTabToNewWindowCommand({ ntxId }: { ntxId: string }) {
|
||||||
const { notePath, hoistedNoteId } = this.getNoteContextById(ntxId);
|
const { notePath, hoistedNoteId, viewScope } = this.getNoteContextById(ntxId);
|
||||||
this.triggerCommand("openInWindow", { notePath, hoistedNoteId });
|
this.triggerCommand("openInWindow", { notePath, hoistedNoteId, viewScope });
|
||||||
}
|
}
|
||||||
|
|
||||||
async reopenLastTabCommand() {
|
async reopenLastTabCommand() {
|
||||||
|
|||||||
Reference in New Issue
Block a user