fix "open in new tab" in tree context menu

This commit is contained in:
zadam 2020-11-24 23:18:53 +01:00
parent 26442f418a
commit 8ae82f5b69

View file

@ -2,9 +2,9 @@ import treeService from './tree.js';
import treeCache from "./tree_cache.js"; import treeCache from "./tree_cache.js";
import hoistedNoteService from './hoisted_note.js'; import hoistedNoteService from './hoisted_note.js';
import clipboard from './clipboard.js'; import clipboard from './clipboard.js';
import protectedSessionHolder from "./protected_session_holder.js";
import noteCreateService from "./note_create.js"; import noteCreateService from "./note_create.js";
import contextMenu from "./context_menu.js"; import contextMenu from "./context_menu.js";
import appContext from "./app_context.js";
class TreeContextMenu { class TreeContextMenu {
/** /**
@ -110,14 +110,7 @@ class TreeContextMenu {
const notePath = treeService.getNotePath(this.node); const notePath = treeService.getNotePath(this.node);
if (command === 'openInTab') { if (command === 'openInTab') {
appContext.tabManager.openTabWithNote(notePath);
const start = Date.now();
await this.node.load(true);
console.log("Reload took", Date.now() - start, "ms");
// appContext.tabManager.openTabWithNote(notePath);
} }
else if (command === "insertNoteAfter") { else if (command === "insertNoteAfter") {
const parentNoteId = this.node.data.parentNoteId; const parentNoteId = this.node.data.parentNoteId;