chore(collection/presentation): address requested changes

This commit is contained in:
Elian Doran
2025-10-16 15:32:16 +03:00
parent 04eeb28c09
commit 5d8ca1ecf7
4 changed files with 12 additions and 21 deletions

View File

@@ -359,7 +359,7 @@ function checkHiddenSubtreeRecursively(parentNoteId: string, item: HiddenSubtree
branch = note.getParentBranches().find((branch) => branch.parentNoteId === parentNoteId);
if (item.content && note.getContent() !== item.content) {
console.log(`Updating content of ${item.id}.`);
log.info(`Updating content of ${item.id}.`);
note.setContent(item.content);
}
@@ -369,7 +369,7 @@ function checkHiddenSubtreeRecursively(parentNoteId: string, item: HiddenSubtree
// If the note exists but doesn't have a branch in the expected parent,
// create the missing branch to ensure it's in the correct location
if (!branch) {
console.log("Creating missing branch for note", item.id, "under parent", parentNoteId);
log.info(`Creating missing branch for note ${item.id} under parent ${parentNoteId}.`);
branch = new BBranch({
noteId: item.id,
parentNoteId: parentNoteId,
@@ -473,7 +473,7 @@ function checkHiddenSubtreeRecursively(parentNoteId: string, item: HiddenSubtree
}).save();
} else if (attr.name === "docName" || (existingAttribute.noteId.startsWith("_help") && attr.name === "iconClass")) {
if (existingAttribute.value !== attr.value) {
console.log(`Updating attribute ${attrId} from "${existingAttribute.value}" to "${attr.value}"`);
log.info(`Updating attribute ${attrId} from "${existingAttribute.value}" to "${attr.value}"`);
existingAttribute.value = attr.value ?? "";
existingAttribute.save();
}