fix(LocalBook): remove duplicated chapter

This commit is contained in:
Xwite
2022-06-04 15:45:57 +08:00
parent c71099a379
commit 05581c30c3

View File

@@ -76,7 +76,8 @@ object LocalBook {
if (chapters.isEmpty()) {
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? {