优化
This commit is contained in:
@@ -110,12 +110,14 @@ object BookChapterList {
|
|||||||
if (!reverse) {
|
if (!reverse) {
|
||||||
chapterList.reverse()
|
chapterList.reverse()
|
||||||
}
|
}
|
||||||
|
scope.ensureActive()
|
||||||
val lh = LinkedHashSet(chapterList)
|
val lh = LinkedHashSet(chapterList)
|
||||||
val list = ArrayList(lh)
|
val list = ArrayList(lh)
|
||||||
if (!book.getReverseToc()) {
|
if (!book.getReverseToc()) {
|
||||||
list.reverse()
|
list.reverse()
|
||||||
}
|
}
|
||||||
Debug.log(book.origin, "◇目录总数:${list.size}")
|
Debug.log(book.origin, "◇目录总数:${list.size}")
|
||||||
|
scope.ensureActive()
|
||||||
list.forEachIndexed { index, bookChapter ->
|
list.forEachIndexed { index, bookChapter ->
|
||||||
bookChapter.index = index
|
bookChapter.index = index
|
||||||
}
|
}
|
||||||
@@ -129,6 +131,7 @@ object BookChapterList {
|
|||||||
}
|
}
|
||||||
book.lastCheckTime = System.currentTimeMillis()
|
book.lastCheckTime = System.currentTimeMillis()
|
||||||
book.totalChapterNum = list.size
|
book.totalChapterNum = list.size
|
||||||
|
scope.ensureActive()
|
||||||
return list
|
return list
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user