This commit is contained in:
Xwite
2023-03-11 13:26:12 +08:00
parent b886a85326
commit c21f55dd20

View File

@@ -153,8 +153,8 @@ class EpubFile(var book: Book) {
val includeNextChapterResource = !endFragmentId.isNullOrBlank()
/*一些书籍依靠href索引的resource会包含多个章节需要依靠fragmentId来截取到当前章节的内容*/
/*注:这里较大增加了内容加载的时间所以首次获取内容后可存储到本地cache减少重复加载*/
epubBookContents ?: return null
for (res in epubBookContents) {
val contents = epubBookContents ?: return null
for (res in contents) {
if (!findChapterFirstSource) {
if (currentChapterFirstResourceHref != res.href) continue
findChapterFirstSource = true