From 8bb6d178f7714200138791e2431716544da2012e Mon Sep 17 00:00:00 2001 From: kunfei Date: Fri, 7 Feb 2020 15:24:40 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BC=98=E5=8C=96?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../io/legado/app/ui/chapterlist/ChapterListFragment.kt | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) 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 9c7254b84..3a9ed036d 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 @@ -39,7 +39,6 @@ class ChapterListFragment : VMBaseFragment(R.layout.fragme initRecyclerView() initView() initBook() - initDoc() } private fun initRecyclerView() { @@ -60,6 +59,7 @@ class ChapterListFragment : VMBaseFragment(R.layout.fragme tv_current_chapter_info.text = it.durChapterTitle mLayoutManager.scrollToPositionWithOffset(durChapterIndex, 0) } + initDoc() } } @@ -81,9 +81,7 @@ class ChapterListFragment : VMBaseFragment(R.layout.fragme } } tv_current_chapter_info.onClick { - book?.let { - mLayoutManager.scrollToPositionWithOffset(it.durChapterIndex, 0) - } + mLayoutManager.scrollToPositionWithOffset(durChapterIndex, 0) } }