fix for icon change when creating note / changing type/mime

This commit is contained in:
azivner
2018-01-28 10:37:43 -05:00
parent 7ca0445bae
commit e8f8341ef9
6 changed files with 29 additions and 18 deletions

View File

@@ -756,16 +756,6 @@ const noteTree = (function() {
is_protected: isProtected
});
const newNode = {
title: newNoteName,
note_id: result.note_id,
parent_note_id: parentNoteId,
refKey: result.note_id,
note_tree_id: result.note_tree_id,
is_protected: isProtected,
extraClasses: isProtected ? "protected" : ""
};
setParentChildRelation(result.note_tree_id, parentNoteId, result.note_id);
notesTreeMap[result.note_tree_id] = result;
@@ -774,6 +764,16 @@ const noteTree = (function() {
noteEditor.newNoteCreated();
const newNode = {
title: newNoteName,
note_id: result.note_id,
parent_note_id: parentNoteId,
refKey: result.note_id,
note_tree_id: result.note_tree_id,
is_protected: isProtected,
extraClasses: getExtraClasses(result.note)
};
if (target === 'after') {
node.appendSibling(newNode).setActive(true);
}