From 03c58f35f7643c21e59bc9e604309db10c724dba Mon Sep 17 00:00:00 2001 From: kunfei Date: Sat, 25 Jan 2020 10:49:58 +0800 Subject: [PATCH] up --- .../java/io/legado/app/ui/chapterlist/ChapterListFragment.kt | 1 + 1 file changed, 1 insertion(+) 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 22092493a..2ead9c56d 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 @@ -53,6 +53,7 @@ class ChapterListFragment : VMBaseFragment(R.layout.fragme viewModel.bookUrl?.let { bookUrl -> App.db.bookChapterDao().observeByBook(bookUrl).observe(viewLifecycleOwner, Observer { adapter.setItems(it) + if (it.isEmpty()) return@Observer viewModel.book?.let { book -> durChapterIndex = book.durChapterIndex tv_current_chapter_info.text = it[durChapterIndex()].title