Skip to content

Build your personal knowledge base with Trilium Notes

Merge branch 'next58'

zadam4026c2be4f09
diff --cc src/public/app/widgets/note_tree.js
index 1de9aa5a51,aba4b7daba..6a277c2eee
--- a/src/public/app/widgets/note_tree.js
+++ b/src/public/app/widgets/note_tree.js
@@@ -1047,7 -1084,9 +1084,9 @@@ export default class NoteTreeWidget ext
const noteIdsToReload = new Set();
for (const ecAttr of loadResults.getAttributes()) {
- if (ecAttr.type === 'label' && ['iconClass', 'cssClass', 'workspace', 'workspaceIconClass', 'color'].includes(ecAttr.name)) {
- const dirtyingLabels = ['iconClass', 'cssClass', 'workspace', 'workspaceIconClass', 'archived', 'color'];
++ const dirtyingLabels = ['iconClass', 'cssClass', 'workspace', 'workspaceIconClass', 'color'];
+
+ if (ecAttr.type === 'label' && dirtyingLabels.includes(ecAttr.name)) {
if (ecAttr.isInheritable) {
noteIdsToReload.add(ecAttr.noteId);
}
diff --cc src/services/tree.js
index d6e96b861c,a6e1ec4d3d..13dfd5058a
--- a/src/services/tree.js
+++ b/src/services/tree.js
@@@ -180,13 -186,14 +187,17 @@@ function sortNotes(parentNoteId, custom
for (const note of notes) {
const branch = note.getParentBranches().find(b => b.parentNoteId === parentNoteId);
+ if (branch.branchId === 'hidden') {
+ position = 999_999_999;
+ }
+
- sql.execute("UPDATE branches SET notePosition = ? WHERE branchId = ?",
- [position, branch.branchId]);
+ if (branch.notePosition !== position) {
+ sql.execute("UPDATE branches SET notePosition = ? WHERE branchId = ?",
+ [position, branch.branchId]);
- becca.branches[branch.branchId].notePosition = position;
+ branch.notePosition = position;
+ someBranchUpdated = true;
+ }
position += 10;
}