优化接触关联阅读界面清除蓝色高亮

This commit is contained in:
DelLevin-Home
2026-07-02 05:38:59 +08:00
parent a7e4845e46
commit 30a002feb2
3 changed files with 26 additions and 2 deletions

View File

@@ -88,6 +88,12 @@ class ReaderDao {
/// 取消关联
Future<int> unlinkBook(String readerBookId) async {
final db = await _db.database;
// 同步删除该书的摘抄蓝色高亮标注
await db.delete(
'book_annotations',
where: 'book_id = ? AND color = ?',
whereArgs: [readerBookId, 'excerpt'],
);
return db.update(
'reader_books',
{'book_id': '', 'updated_at': DateTime.now().toIso8601String()},