feat: Update category deletion logic to reset related notes and track changes

This commit is contained in:
2026-05-21 12:01:44 +02:00
parent 5412d31066
commit 95c3e6fc38
3 changed files with 11 additions and 1 deletions
+5
View File
@@ -87,6 +87,11 @@ class NoteRepository {
Future<void> deleteCategory(String id) async {
await _database.deleteCategory(id);
await _database.customStatement(
'UPDATE notes SET category_id = NULL, is_dirty = 1 WHERE category_id = ?',
[id],
);
}
Future<Note> createNote(Note note) async {