fix(LocalBook): remove duplicated chapter

pull/1949/head
Xwite 3 years ago
parent c71099a379
commit 05581c30c3
  1. 3
      app/src/main/java/io/legado/app/model/localBook/LocalBook.kt

@ -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? {

Loading…
Cancel
Save