优化windows笔记功能

This commit is contained in:
DelLevin-Home
2026-07-15 02:57:41 +08:00
parent 6f55ab87c7
commit 5dc8d64857
21 changed files with 983 additions and 406 deletions

View File

@@ -65,9 +65,12 @@ class NoteDao {
// 更新笔记
Future<int> updateNote(Note note) => _wrap('updateNote', () async {
final db = await _dbHelper.database;
final data = note.toJson();
// 不覆盖 created_at保持创建时间不变
data.remove('created_at');
return await db.update(
'notes',
note.toJson(),
data,
where: 'id = ?',
whereArgs: [note.id],
);