bookmark buttons should behave similarly as other launcher buttons in respect to context menu, ctrl-click, left click

This commit is contained in:
zadam
2022-12-19 23:19:47 +01:00
parent db5e76fe8c
commit 8c4dda45ef
5 changed files with 36 additions and 46 deletions

View File

@@ -249,6 +249,18 @@ export default class TabManager extends Component {
return noteContext;
}
async openInNewTab(targetNoteId, hoistedNoteId = null) {
const noteContext = await this.openEmptyTab(null, hoistedNoteId || this.getActiveContext().hoistedNoteId);
await noteContext.setNote(targetNoteId);
}
async openInSameTab(targetNoteId, hoistedNoteId = null) {
const activeContext = this.getActiveContext();
await activeContext.setHoistedNoteId(hoistedNoteId || activeContext.hoistedNoteId);
await activeContext.setNote(targetNoteId);
}
/**
* If the requested notePath is within current note hoisting scope then keep the note hoisting also for the new tab.
*/