Explorar el Código

feat(epub): 识别多级目录

Xwite hace 4 años
padre
commit
5fc054176e
Se han modificado 1 ficheros con 1 adiciones y 5 borrados
  1. 1 5
      app/src/main/java/io/legado/app/model/localBook/EpubFile.kt

+ 1 - 5
app/src/main/java/io/legado/app/model/localBook/EpubFile.kt

@@ -317,16 +317,12 @@ class EpubFile(var book: Book) {
                 chapter.url = ref.completeHref
                 chapter.url = ref.completeHref
                 chapter.startFragmentId = ref.fragmentId
                 chapter.startFragmentId = ref.fragmentId
                 chapterList.lastOrNull()?.endFragmentId = chapter.startFragmentId
                 chapterList.lastOrNull()?.endFragmentId = chapter.startFragmentId
-                /**
-                 * 二级目录判定 todo
-                 */
-                val isVolume = false
-                chapterList.lastOrNull()?.isVolume = isVolume
                 chapterList.lastOrNull()?.putVariable("nextUrl", chapter.url)
                 chapterList.lastOrNull()?.putVariable("nextUrl", chapter.url)
                 chapterList.add(chapter)
                 chapterList.add(chapter)
                 durIndex++
                 durIndex++
             }
             }
             if (ref.children != null && ref.children.isNotEmpty()) {
             if (ref.children != null && ref.children.isNotEmpty()) {
+                chapterList.lastOrNull()?.isVolume = true
                 parseMenu(chapterList, ref.children, level + 1)
                 parseMenu(chapterList, ref.children, level + 1)
             }
             }
         }
         }