1.EPUB 搜索结果导航缺少越界保护
2.优化清空回收站时 N 条删除触发 N 次全量重载
This commit is contained in:
DelLevin-Home
2026-07-01 18:46:59 +08:00
parent d5bec0fe9b
commit a0a146854b

View File

@@ -416,8 +416,12 @@ class _ReaderScreenState extends State<ReaderScreen>
streamService: _streamService,
onNavigate: (spineIndex, keyword, scrollRatio) {
Navigator.pop(ctx);
if (spineIndex >= 0 && spineIndex < bookSession.spine.length) {
setState(() => currentSpineItemIndex = spineIndex);
loadCarousel(restoreScrollRatio: scrollRatio);
} else if (mounted) {
ToastUtil.show(context, '章节位置无效');
}
},
),
);