display unhoist button on the left of the note title so that it's always visible, #1223

This commit is contained in:
zadam
2020-09-08 23:25:21 +02:00
parent a73733d0fc
commit ee4ce3ffd8
4 changed files with 14 additions and 4 deletions

View File

@@ -1,6 +1,7 @@
import options from './options.js';
import appContext from "./app_context.js";
import treeService from "./tree.js";
import treeCache from "./tree_cache.js";
function getHoistedNoteId() {
return options.get('hoistedNoteId');
@@ -9,6 +10,8 @@ function getHoistedNoteId() {
async function setHoistedNoteId(noteId) {
await options.save('hoistedNoteId', noteId);
await treeCache.loadInitialTree();
// FIXME - just use option load event
appContext.triggerEvent('hoistedNoteChanged', {noteId});
}