refactoring

This commit is contained in:
zadam
2020-01-24 15:44:24 +01:00
parent 8651e47118
commit 4b66765cc1
12 changed files with 87 additions and 89 deletions

View File

@@ -2,6 +2,7 @@ import optionsService from './options.js';
import server from "./server.js";
import tree from "./tree.js";
import noteDetailService from "./note_detail.js";
import appContext from "./app_context.js";
let hoistedNoteId = 'root';
@@ -28,13 +29,7 @@ async function setHoistedNoteId(noteId) {
await server.put('options/hoistedNoteId/' + noteId);
await tree.reload();
const activeTabContext = appContext.getActiveTabContext();
if (activeTabContext) {
await tree.activateNote(activeTabContext.notePath);
}
appContext.trigger('hoistedNoteChanged');
}
async function unhoist() {