Merge pull request #1949 from Xwite/master

fix(epub): titlepage.xhtml location
This commit is contained in:
kunfei
2022-06-04 18:29:32 +08:00
committed by GitHub
2 changed files with 5 additions and 5 deletions
@@ -122,11 +122,10 @@ class EpubFile(var book: Book) {
private fun getContent(chapter: BookChapter): String? { private fun getContent(chapter: BookChapter): String? {
/** /**
* <image width="1038" height="670" xlink:href="cover.jpeg"/> * <image width="1038" height="670" xlink:href="..."/>
* <img width="1038" height="670" src="cover.jpeg"/> * ...titlepage.xhtml
* titlepage.xhtml
*/ */
if (chapter.url == "titlepage.xhtml") { if (chapter.url.contains("titlepage.xhtml")) {
return "<img src=\"cover.jpeg\" />" return "<img src=\"cover.jpeg\" />"
} }
/*获取当前章节文本*/ /*获取当前章节文本*/
@@ -76,7 +76,8 @@ object LocalBook {
if (chapters.isEmpty()) { if (chapters.isEmpty()) {
throw TocEmptyException(appCtx.getString(R.string.chapter_list_empty)) throw TocEmptyException(appCtx.getString(R.string.chapter_list_empty))
} }
return chapters val lh = LinkedHashSet(chapters)
return ArrayList(lh)
} }
fun getContent(book: Book, chapter: BookChapter): String? { fun getContent(book: Book, chapter: BookChapter): String? {