feat: Update category deletion logic to reset related notes and track changes
This commit is contained in:
@@ -86,7 +86,11 @@ class AppDatabase extends _$AppDatabase {
|
||||
|
||||
Future<void> deleteCategory(String id) {
|
||||
return (update(categories)..where((c) => c.id.equals(id))).write(
|
||||
CategoriesCompanion(isDeleted: Value(true)),
|
||||
CategoriesCompanion(
|
||||
isDeleted: const Value(true),
|
||||
updatedAt: Value(DateTime.now()),
|
||||
isDirty: const Value(true),
|
||||
),
|
||||
);
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user