use .markAsDeleted() instead of setting .isDeleted manually

This commit is contained in:
zadam
2021-05-02 20:32:50 +02:00
parent 273d4e0052
commit c035627f0a
12 changed files with 42 additions and 68 deletions

View File

@@ -196,14 +196,13 @@ function setNoteToParent(noteId, prefix, parentNoteId) {
if (branch) {
if (!parentNoteId) {
branch.isDeleted = true;
branch.markAsDeleted();
}
else {
branch.parentNoteId = parentNoteId;
branch.prefix = prefix;
branch.save();
}
branch.save();
}
else if (parentNoteId) {
const note = becca.getNote(noteId);