mirror of
https://github.com/gedoor/legado.git
synced 2024-07-06 23:47:49 +08:00
优化
This commit is contained in:
parent
d604b96032
commit
ac1af0eade
@ -311,6 +311,7 @@ class EpubFile(var book: Book) {
|
||||
) {
|
||||
val contents = epubBook?.contents
|
||||
if (epubBook == null || contents == null || refs == null) return
|
||||
val firstRef = refs.firstOrNull { it.resource != null } ?: return
|
||||
var i = 0
|
||||
durIndex = 0
|
||||
while (i < contents.size) {
|
||||
@ -321,7 +322,7 @@ class EpubFile(var book: Book) {
|
||||
* completeHref可能有fragment(#id) 必须去除
|
||||
* fix https://github.com/gedoor/legado/issues/1932
|
||||
*/
|
||||
if (refs[0].completeHref.substringBeforeLast("#") == content.href) break
|
||||
if (firstRef.completeHref.substringBeforeLast("#") == content.href) break
|
||||
val chapter = BookChapter()
|
||||
var title = content.title
|
||||
if (TextUtils.isEmpty(title)) {
|
||||
|
Loading…
Reference in New Issue
Block a user