Merge pull request #1935 from Xwite/master

fix(epub): 最后一章内容缺失
pull/1941/head
kunfei 2 years ago committed by GitHub
commit 7efe1e537c
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
  1. 3
      app/src/main/java/io/legado/app/model/localBook/EpubFile.kt

@ -141,7 +141,8 @@ class EpubFile(var book: Book) {
*/
if (!nextUrl.isNullOrBlank() && res.href == nextUrl!!.substringBeforeLast("#")) break
} else if (isChapter) {
if (nextUrl.isNullOrBlank() || res.href == nextUrl.substringBeforeLast("#")) {
// fix 最后一章存在多个html时 内容缺失
if (!nextUrl.isNullOrBlank() && res.href == nextUrl.substringBeforeLast("#")) {
break
}
elements.add(getBody(res, startFragmentId, endFragmentId))

Loading…
Cancel
Save