From 59046456c664c7bf11630acc411db5053fb7f2e8 Mon Sep 17 00:00:00 2001 From: Xwite <1797350009@qq.com> Date: Tue, 31 May 2022 19:57:24 +0800 Subject: [PATCH] fix(epub): fix https://github.com/gedoor/legado/pull/1929/commits/dd5b1fb488c7cf90356bc783aad64ff05eac5990 --- app/src/main/java/io/legado/app/model/localBook/EpubFile.kt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/src/main/java/io/legado/app/model/localBook/EpubFile.kt b/app/src/main/java/io/legado/app/model/localBook/EpubFile.kt index 6beb223a1..0b6b06602 100644 --- a/app/src/main/java/io/legado/app/model/localBook/EpubFile.kt +++ b/app/src/main/java/io/legado/app/model/localBook/EpubFile.kt @@ -139,7 +139,7 @@ class EpubFile(var book: Book) { * content src text/000001.html(当前章节) - * content src text/000001.html#toc_id_x (下一章节) */ - if (res.href == nextUrl?.substringBeforeLast("#")) break + if (!nextUrl.isNullOrBlank() && res.href == nextUrl!!.substringBeforeLast("#")) break } else if (isChapter) { if (nextUrl.isNullOrBlank() || res.href == nextUrl.substringBeforeLast("#")) { break