提交 4bb6cec5 authored 作者: yueweilu's avatar yueweilu

笔记列表删除笔记 重新刷新阅读页用以更新阅读页上的高亮划线数据

上级 744aafdb
...@@ -407,6 +407,10 @@ class _ReadPageState extends State<ReadPage> { ...@@ -407,6 +407,10 @@ class _ReadPageState extends State<ReadPage> {
controller.selectChapter(ChapterModel(id: sModel.chapterId,name: sModel.chapterName)); controller.selectChapter(ChapterModel(id: sModel.chapterId,name: sModel.chapterName));
controller.webViewController.reload(); controller.webViewController.reload();
}, },
// 删除笔记后 重新刷新web页
delTapCallBack: (){
controller.webViewController.reload();
},
bookDetailModel: controller.bookDetailModel, bookDetailModel: controller.bookDetailModel,
chapterId: controller.chapterId, chapterId: controller.chapterId,
); );
......
...@@ -7,12 +7,14 @@ class ReadNotePage extends StatefulWidget { ...@@ -7,12 +7,14 @@ class ReadNotePage extends StatefulWidget {
// 当前的章节id // 当前的章节id
final String chapterId; final String chapterId;
final void Function()? onTap; final void Function()? onTap;
final void Function() delTapCallBack;
const ReadNotePage({ const ReadNotePage({
Key? key, Key? key,
required this.onTap, required this.onTap,
required this.bookDetailModel, required this.bookDetailModel,
required this.chapterId, required this.chapterId,
this.onTapSearchItem this.onTapSearchItem,
required this.delTapCallBack
}) : super(key: key); }) : super(key: key);
@override @override
...@@ -117,6 +119,7 @@ class _ReadNotePageState extends State<ReadNotePage> { ...@@ -117,6 +119,7 @@ class _ReadNotePageState extends State<ReadNotePage> {
model: model, model: model,
onTapDel: (){ onTapDel: (){
controller.delNotes(noteModel: model, bookId:widget.bookDetailModel.bookId.toString()); controller.delNotes(noteModel: model, bookId:widget.bookDetailModel.bookId.toString());
widget.delTapCallBack();
}, },
); );
} }
...@@ -126,6 +129,7 @@ class _ReadNotePageState extends State<ReadNotePage> { ...@@ -126,6 +129,7 @@ class _ReadNotePageState extends State<ReadNotePage> {
model: model, model: model,
onTapDel: (){ onTapDel: (){
controller.delNotes(noteModel: model, bookId:widget.bookDetailModel.bookId.toString()); controller.delNotes(noteModel: model, bookId:widget.bookDetailModel.bookId.toString());
widget.delTapCallBack();
}, },
); );
} }
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论