feat: 优化代码

pull/98/head
kunfei 5 years ago
parent 964c6d4a52
commit f708657ce5
  1. 4
      app/src/main/java/io/legado/app/ui/chapterlist/ChapterListFragment.kt

@ -74,7 +74,7 @@ class ChapterListFragment : VMBaseFragment<ChapterListViewModel>(R.layout.fragme
durChapterIndex = it.durChapterIndex
tv_current_chapter_info.text = it.durChapterTitle
mLayoutManager.scrollToPositionWithOffset(durChapterIndex, 0)
initCatchFileNames(it)
initCacheFileNames(it)
}
}
}
@ -88,7 +88,7 @@ class ChapterListFragment : VMBaseFragment<ChapterListViewModel>(R.layout.fragme
})
}
private fun initCatchFileNames(book: Book) {
private fun initCacheFileNames(book: Book) {
launch(IO) {
adapter.cacheFileNames.addAll(BookHelp.getChapterFiles(book))
withContext(Main) {

Loading…
Cancel
Save