mirror of
https://github.com/zadam/trilium.git
synced 2025-10-29 17:26:38 +01:00
refactoring of note detail API
This commit is contained in:
@@ -53,7 +53,8 @@ export default class NoteTreeWidget extends TabAwareWidget {
|
||||
|
||||
treeUtils.getNotePath(node).then(notePath => {
|
||||
if (notePath) {
|
||||
noteDetailService.openInTab(notePath, false);
|
||||
const tabContext = appContext.openEmptyTab();
|
||||
tabContext.setNote(notePath);
|
||||
}
|
||||
});
|
||||
|
||||
@@ -87,7 +88,9 @@ export default class NoteTreeWidget extends TabAwareWidget {
|
||||
node.setFocus(true);
|
||||
}
|
||||
else if (event.ctrlKey) {
|
||||
noteDetailService.loadNoteDetail(node.data.noteId, { newTab: true });
|
||||
const tabContext = appContext.openEmptyTab();
|
||||
treeUtils.getNotePath(node).then(notePath => tabContext.setNote(notePath));
|
||||
appContext.activateTab(tabContext.tabId);
|
||||
}
|
||||
else {
|
||||
node.setActive();
|
||||
|
||||
Reference in New Issue
Block a user