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

@@ -864,8 +864,8 @@ class Note extends AbstractEntity {
this.utcDateModified = dateUtils.utcNowDateTime();
}
markAsDeleted() {
sql.execute("UPDATE notes SET isDeleted = 1 WHERE noteId = ?", [this.noteId]);
markAsDeleted(deleteId = null) {
sql.execute("UPDATE notes SET isDeleted = 1, deleteId = ? WHERE noteId = ?", [deleteId, this.noteId]);
// FIXME: this needs to be published into entity_changes (for sync and becca cleanup)
}