refactoring of note detail API

This commit is contained in:
zadam
2020-01-24 17:54:47 +01:00
parent 4b66765cc1
commit 606d5afcab
18 changed files with 107 additions and 219 deletions

View File

@@ -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();