load initial tree from note cache

This commit is contained in:
zadam
2020-12-11 22:06:12 +01:00
parent 35e47f866a
commit 5098dda376
7 changed files with 108 additions and 125 deletions

View File

@@ -20,11 +20,11 @@ function load() {
new Note(noteCache, row);
}
for (const row of sql.iterateRows(`SELECT branchId, noteId, parentNoteId, prefix FROM branches WHERE isDeleted = 0`, [])) {
for (const row of sql.iterateRows(`SELECT branchId, noteId, parentNoteId, prefix, notePosition, isExpanded FROM branches WHERE isDeleted = 0`, [])) {
new Branch(noteCache, row);
}
for (const row of sql.iterateRows(`SELECT attributeId, noteId, type, name, value, isInheritable FROM attributes WHERE isDeleted = 0`, [])) {
for (const row of sql.iterateRows(`SELECT attributeId, noteId, type, name, value, isInheritable, position FROM attributes WHERE isDeleted = 0`, [])) {
new Attribute(noteCache, row);
}