From 2ac560c56e2d347fccc0ad51b8d62999408a7f74 Mon Sep 17 00:00:00 2001 From: azivner Date: Tue, 22 Jan 2019 21:21:44 +0100 Subject: [PATCH] text note should change its icon after having new note inserted into, fixes #361 --- src/public/javascripts/services/tree.js | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/public/javascripts/services/tree.js b/src/public/javascripts/services/tree.js index 15589a78e..df9df1672 100644 --- a/src/public/javascripts/services/tree.js +++ b/src/public/javascripts/services/tree.js @@ -623,7 +623,10 @@ async function createNote(node, parentNoteId, target, isProtected, saveSelection await node.getLastChild().setActive(true); + const parentNoteEntity = await treeCache.getNote(node.data.noteId); + node.folder = true; + node.icon = await treeBuilder.getIcon(parentNoteEntity); // icon might change into folder node.renderTitle(); } else {