diff --git a/app/src/main/java/io/legado/app/ui/chapterlist/ChapterListFragment.kt b/app/src/main/java/io/legado/app/ui/chapterlist/ChapterListFragment.kt index dacc8a851..d237ea2dd 100644 --- a/app/src/main/java/io/legado/app/ui/chapterlist/ChapterListFragment.kt +++ b/app/src/main/java/io/legado/app/ui/chapterlist/ChapterListFragment.kt @@ -52,14 +52,14 @@ class ChapterListFragment : VMBaseFragment(R.layout.fragme liveData?.removeObservers(viewLifecycleOwner) liveData = LivePagedListBuilder(App.db.bookChapterDao().observeByBook(viewModel.bookUrl ?: ""), 30).build() liveData?.observe(viewLifecycleOwner, Observer { adapter.submitList(it) }) - } - - private fun initView() { viewModel.bookDate.value?.let { loadBookFinish(it) } ?: viewModel.bookDate.observe(viewLifecycleOwner, Observer { loadBookFinish(it) }) + } + + private fun initView() { iv_chapter_top.onClick { recycler_view.scrollToPosition(0) } iv_chapter_bottom.onClick { if (adapter.itemCount > 0) {