fix setting title

This commit is contained in:
azivner
2017-11-28 10:17:30 -05:00
parent 40a522a9aa
commit 7038636d2e
3 changed files with 40 additions and 22 deletions

View File

@@ -38,11 +38,21 @@ const treeUtils = (function() {
return path.reverse().join("/");
}
function setNodeTitleWithPrefix(node) {
const noteTitle = noteTree.getNoteTitle(node.data.note_id);
const prefix = node.data.prefix;
const title = (prefix ? (prefix + " - ") : "") + noteTitle;
node.setTitle(title);
}
return {
getParentProtectedStatus,
getNodeByKey,
getFullNameForPath,
getNotePath,
getNoteIdFromNotePath
getNoteIdFromNotePath,
setNodeTitleWithPrefix
};
})();